Tools User Interface Center JavaScript functions

The following JavaScript functions are available to your JSP page if it is inside of a Tools User Interface Center, from the top frame, accessible by top.functionName().

JavaScript Function Description
put(String key, String value) Stores the given value in the top level JavaScript object.
get(String key, String defaultValue) Returns the value of the given key from the top level JavaScript object.
remove(String key) Removes the given key from the top level JavaScript object.
openHelp() Opens a context sensitive help window. This is functionally equivalent to when the user clicks Help.
setContent(String text, String link, Boolean newtrail, Object parameters) Sets the content frame URL and updates the breadcrumb trail. Supported arguments are:
text
This value specifies the text that displays in the breadcrumb trail.
link
This value defines the URL to load in the content frame.
newtrail
This value specifies whether a new item should be added to the breadcrumb trail. If true, an additional item is added to the end of the breadcrumb trail; if false, this item replaces the last item in the breadcrumb trail.
parameters (optional)
Use this only if your link contains locale dependent characters (which may get corrupted using direct URL location replacement). If this parameter is used, the Tools Framework dynamically generates a form based on this parameter object and submits the URL parameters as name-value pairs.
showContent(String link, Object parameters) Sets content frame URL without updating the breadcrumb trail. Supported arguments are:
link
This value defines the URL to load in the content frame.
parameters (optional)
Use this only if your link contains locale dependent characters (which may get corrupted using direct URL location replacement). If this parameter is used, the Tools Framework dynamically generates a form based on this parameter object and submits the URL parameters as name-value pairs.
setHome() Sets the content frame to the default Home page, and resets the breadcrumb trail to the initial state. For example, sets the breadcrumb trail to "logout - home".
goBack() Goes back one item in the breadcrumb trail and removes the last item from the breadcrumb trail.
resetBCT() Resets the breadcrumb trail to the initial state. For example, sets the breadcrumb trail to "logout - home".
refreshBCT() Refreshes the breadcrumb trail to reflect the current state.
showProgressIndicator(Boolean flag) Manually turns on or off the progress indicator.
SaveData(Object model, String slotName) Saves data so that it can be retrieved later, either in the same page or in another page or element. Supported arguments are:
model
Specifies a data object, which requires saving.
slotName
A handle to be used later to retrieve the data.
getData(String slotName, int stepsBack) Gets data saved before using the SaveData function. Supported arguments are:
slotName
A handle pointing at the location where the data was previously saved.
stepsBack
An optional value, which specifies how many items back, with respect to the breadcrumb trail, this data object was saved. The default value is '0'.
sendBackData(Object data, String slotName) Sends a data object back to the calling wizard. This is used in Wizard Chaining. Supported arguments are:
Data
The data object you want to send back to the previous item in the breadcrumb trail.
SlotName
A handle to be used later to retrieve the data.
saveModel(Object model) A function provided for convenience which saves the "model" object, which is used often within notebooks, wizards, and dialogs. Supported arguments are:
model
Specifies the model object.
getModel(stepsBack) A convenience function to get back the "model" object previously saved. Supported arguments are:
stepsBack
An optional value that specifies how many items back, with respect to the breadcrumb trail, this model object was saved. The default value is '0'.
setReturningPanel(String panelName) Sets the returning panel name. This is typically used in a Wizard Chaining scenario. Supported arguments are:
panelName
Specifies the name of the panel in a notebook or wizard.
setRemoteHelp(String key) Sets the remote helpkey. Use this function only if your next content page is served from a remote site. Due to a browser restriction, the tools user interface top frame cannot call remote content frame's getHelp() function. Instead, a help key must be set before the remote page is loaded.
getRemoteHelp() Gets the remote helpkey set by the setRemoteHelp() function.
getCSSFile() Gets the locale dependent cascading stylesheet file name. For example, centre_zh_TW.css.
menuVisible(int index, boolean flag) Sets menu visible or hidden dynamically. Supported arguments are:
index
Specifies the number of the menu.
flag
A Boolean, which determines whether the menu is visible. If true, the menu is visible.