Development tools : XUI editor : XUI widgets and containers : Widget descriptions : Java Script
  
Java Script
Java Script is a hidden widget, which cannot be displayed in XUI editor. You can drag it to the Outline panel.
See
Implementation base
Property for the Script widget
See also
Widget descriptions
Implementation base
The Script widget is a Dojo-based widget:
com.ibm.btt.dijit.Script
See also
Java Script
Property for the Script widget
 
Property
Description
id
The identifier for the widget. It would be validated when the mode is changed.
url
This property indicates the location of an external JavaScript file. Users can choose a JavaSript file in the whole workspace by the JS selector, or manually edit the location.
The values of 'url' and 'content' must not be empty at the same time. The value of 'content' overrides the value of 'value' when both are specified.
JS selector can list the JS files only under the default JS folder (and subfolders). To change the default JS folder, see Setting default JS folder path.
content
This property indicates the JavaScript code directly. Users can input the code in the multi-line text editor.
The values of 'url' and 'content' must not be empty at the same time. The value of 'content' overrides the value of 'value' when both are specified.
executeOnload
This property is a Boolean type property that indicates whether the JavaScript code gets ran when the page is on load. The default value is true.
inlineScript
This property is a Boolean type property that indicates whether the JavaScript codes can be loaded to the content property during the generation of the js file for a XUI page. The default value is false.
See
ECA editor support
See also
Java Script
ECA editor support
There is no event for Script widget. The following properties and functions can be configured for the Script widget with the ECA editor.
Functions that can be configured for the Script widget with the ECA editor
 
Function
Description
execute
This function is used to run the JS codes that are bound with current widget after the codes are evaluated. It supports dynamic parameters, which can be accessed in the imported codes as global variables.
This property can be used in the Condition part of ECA rule.
See also
Property for the Script widget