Custom Interface Helper Methods
All custom interfaces of type <scriptedInterface> must have a handler method in …\JSXAPPS\workspace\application\js\AppMain.js. The name of the method must match the value of the source attribute in the scripted interface definition. The method is automatically invoked when the menu item or toolbar button of the custom interface is selected.
Each handler method must receive an interfaceObject as an input parameter, which is a reference to the menu item or toolbar button that launches the custom interface. This interfaceObject is then passed to the various "helper" methods that are used to create custom interfaces.
Also see the loadInterface_sample method, in …\JSXAPPS\workspace\application\js\AppMain.js for examples of how to use the helper methods.
The following helper methods are available.
- Attribute Methods - These methods get and set the attributes used in custom interface definitions:
- getInterfaceName
- getInterfaceDisplayText / setInterfaceDisplayText
- getInterfaceToolTip / setInterfaceToolTip
- getInterfaceImage / setInterfaceImage
- getInterfaceFeatures / setInterfaceFeatures
- getInterfaceVisible / setInterfaceVisible
- getInterfaceEnabled / setInterfaceEnabled
- getInterfaceParent
- getInterfaceLaunchType
- getInterfaceMenuItems
- getInterfaceLocation
- getInterfaceSource
- getInterfaceSelectedRecords
- getInterfaceCaption / setInterfaceCaption / showInterfaceCaption
- Load Methods - These methods can be used to load each of the different types of custom interfaces:
- Close Method - This method closes a custom interface:
- Master Selection Area Methods - These methods are used to control custom interfaces that are defined to display in the Master Selection Area. These methods support the use case of one scripted custom interface changing the attributes of another simple iFrame custom interface. An example of this use case — a button on a work item or events list using an attribute from the selected item in the list to do a tibbr search shown by a custom interface in the Master Selection Area — is illustrated in the tibbrSearch sample custom interface (see Sample Custom Interfaces):