- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2015 12:00 PM
Hello developer peoples!
I have a ui page that I can't seem to make updates to. The UI page is called from a UI Action using this code:
function addRecipients(){
//Get the table name and sys_id of the record
var tableName = g_form.getTableName();
var sysID = g_form.getUniqueValue();
//Open a dialog window to select Approval Groups
var dialog = new GlideDialogWindow( 'xm_add_recipients' );
dialog.setTitle('Add Recipients');
// If we needed to pass info from here to the UI page...
// dialog.setPreference('sysparm_parm1', 'stuff here');
dialog.render();
//Make sure to not submit the form when button gets clicked
return false;
}
The UI Page itself has a ui_slushbucketon it, but I can get the same results without the slushbucket. For example, if this is my HTML in the UI Page:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:ui_form>
some stuff goes here
</g:ui_form>
</j:jelly>
Then I change it to this and hit save
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:ui_form>
Other stuff goes here
</g:ui_form>
</j:jelly>
The dialog still shows "some stuff goes here". The only way I can get it to change is to delete the UI Page and recreate from scratch with the new changes.
I know I am editing the right UI Page because if I add an onLoad "alert" call, I see the alert displayed as expected. It seems that only the html part of the UI Page is cached??
Any ideas?
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2015 12:02 PM
Hi Travis,
In the navigation filter, type cache.do or navigate to the cache.do page to clear the cache after you update the page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2015 12:02 PM
Hi Travis,
In the navigation filter, type cache.do or navigate to the cache.do page to clear the cache after you update the page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2015 03:14 PM
Awesome. That did it.
Seems to be different behavior in Eureka? I could make changes without having to clear the cache.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2015 03:18 PM
That is strange. According to the wiki using phase 1 jelly (j and g instead of j2/g2) is not supposed to be cached on UI Pages. I searched the Fuji release notes but saw nothing about this change. If intended, its a pretty nice change in my opinion. Caching of UI Pages could be a useful tool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2015 03:19 AM
This seems to have been fixed in Fuji Patch1. At least, this is what I came across in the release notes:
PRB621068: Edits to a UI page require a cache flush (cache.do) for changes to be effective
Release:Fuji Patch 1 - ServiceNow Wiki
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/