Kony Quantum is now HCL Volt MX. See Revised Terminology. Current Quantum users, see the important note about API naming.
Release:
Form Events
This widget has been deprecated. Older applications that use it will still function, but new applications should use the FlexForm widget.
Form widget has the following events associated:
Note: In Server side Mobile Web platform, only the last event form.show or an alert will be displayed. For example, If there are 3 alert statements and an event form.show in the end, then form is displayed. Alert will not be displayed. Similarly you call a form.show and in subsequent statements or in form pre/post events you call alert then that alert will be displayed but not the form.
An event callback invoked by the platform when the form is accessed for first time after its construction. This function gets executed only once on in lifetime of the form. If a destroyed form is accessed, the form is re-initialized and this callback is once again invoked. Forms can be destroyed using destroy method.
Syntax
addWidgets()
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available on all platforms
init Event
This event gets called only once in form life cycle that is when the form is ready with its widget hierarchy. This will get called after addwidgets method allowing user for any one-time initializations.
When form is destroyed and reused again, init gets called as a part of form lifecycle.
Syntax
JavaScript: init
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available on all platforms
onActionBarBack Event
An event callback that is invoked by the platform when the back button is pressed on an action bar. The back button exists on the left side of the action bar with UP caret symbol. It is enabled only when onActionBarBack callback is registered on form and showActionBarIcon is set to true.
Note: This event is displayed in the widget properties list only when you select SDK versions 3.0 and above in the Application Properties > Native > Android > SDK Versions section.
Syntax
JavaScript: onActionBarBack
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available on Android/Android tablet only
onHide
Specifies an Event which is triggered when a form goes completely out of view.
This event is triggered in the following scenarios:
This event is not triggered in the following scenarios:
The form is partially or completely covered by the Popup.
The form is partially or completely covered by the Application Menu.
Syntax
JavaScript: onHide
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available on all platforms
onOrientationChange
Specifies an Event which is triggered when there is a change in orientation of the form from portrait to landscape or vice versa.
Note: Blackberry devices will raise these event only if the displayOrientation mode of the form is set to FORM_ DISPLAY_ORIENTATION_BOTH.
For more information about defining an action sequence for this event, see Event Editor in the VoltMX Iris User Guide.
Syntax
JavaScript: onOrientationChange
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available on all platforms except Windows Desktop, and Desktop Web
onDeviceBack
Specifies an event which is triggered when the user uses the back button on the device.
For more information see Event Editor in the Volt MX Iris User Guide.
Syntax
JavaScript: onDeviceBack
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Android
BlackBerry
BlackBerry 10
SPA (iPhone/Android/BlackBerry/Windows NTH)
onDeviceMenu
Specifies an event which is triggered when the user uses the back button on the device.
For more information see Event Editor in the Volt MX Iris User Guide.
Syntax
JavaScript: onDeviceMenu
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Android
BlackBerry 10
onDestroy
Specifies an event which is triggered when the form is destroyed.
For more information see Event Editor in the Volt MX Iris User Guide.
Syntax
JavaScript: onDestroy
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available on all platforms
preShow
preShow is executed every time a form is to be displayed. This event is called even on device back or while navigating back to the form through title bar navigation items.
In case of preShow and postShow will not get executed when navigate using the browser “back”.
Syntax
JavaScript: preShow
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available on all platforms
postShow
postShow is invoked after a form is displayed. Gets called even on device back or while navigating back to the form through title bar navigation items.
In case of preShow and postShow will not get executed when navigate using the browser “back”. In preShow and postShow of the startup form, Alerts should be avoided. If any alerts are present in the events of the form, the last alert gets executed and form will never render.
Note: If there are any network calls in postshow, you cannot perform any operation on the form and a busy indication is displayed until the postshow execution is complete.
Syntax
JavaScript: postShow
Read/Write
Yes - (Read and Write)
Example
Platform Availability
Available on all platforms
onLoadJS
Specifies the name of function to be executed when a form is loaded. The function must exist in the javascript folder. For more information on defining the onLoadJS event, refer to VoltMX Iris User Guide.
Syntax
JavaScript: onLoadJS
Read/Write
Yes - (Read and Write)
Example
Accessible from IDE
Yes
Platform Availability
Available on Server side Mobile Web (BJS and Advanced) platform
Specifies the name of function to be executed when a form is unloaded. The function must exist in a javascript file. For more information on defining the unLoadJS event, refer to VoltMX Iris User Guide.
Syntax
JavaScript: unLoadJS
Read/Write
Yes - (Read and Write)
Example
Accessible from IDE
Yes
Platform Availability
Available on Server side Mobile Web (Advanced) platform