IBM WebSphere Multichannel Bank Transformation Toolkit, Version 7.1

Form

The Form widget is a container for widgets that belong to one form.

Implementation base

The Form widget is a Dojo-based widget:
  • com.ibm.btt.dijit.Form

Properties

The following properties can be configured for the Form widget.
Table 1. Properties that can be configured for the Form widget.
Property Description
styleClass The styleClass property specifies the class selector that is associated with the widget. If you do not configure the styleClass property, the default class selector is used instead.
id The id is the identifier for the widget.
defaultAction The defaultAction property specifies the default server-side action that is executed when the form is submitted. The defaultAction property consists of the following sub-properties:
flowEvent
The flowEvent is the event that is sent to the WebSphere® Multichannel Bank Transformation Toolkit navigation flow and causes the processor to proceed to the next state when the form is submitted.
flowId
The flowId is the ID of the WebSphere Multichannel Bank Transformation Toolkit flow that is launched when the form is submitted. If a flowId is specified, a new flow instance is created and initiated on the server.
operationId
The operationId is the ID of the WebSphere Multichannel Bank Transformation Toolkit operation that is launched when the form is submitted.
The values that are specified for the defaultAction property are used in the following scenarios:
  • When a user clicks a submit button and the action property of the submit button does not have a value.
  • When a user submits a form by using a mechanism other than by clicking a submit button, for example, by pressing the Enter key.
  • When the submit() method is invoked by client-side code.
validateOnSubmit The validateOnSubmit property specifies whether validation is required for the widgets that are contained in the form. If the validateOnSubmit property is set to true and any of the widgets contained in the form fail during validation, the submit button will be disabled. The default value is true.

Data mapping

There is no data mapping to the WebSphere Multichannel Bank Transformation Toolkit context for the Form widget.

ECA editor support

The following events, properties, and functions can be configured for the Form widget with the ECA editor.
Table 2. Events that can be added to the Form widget by using the ECA editor.
Event Description
onClick Is fired when the left mouse button is clicked.
onFocus Is fired when the widget receives focus because the user moves the mouse pointer over the widget.
onBlur Is fired when the widget does not receive focus, or when the user clicks outside the widget, or when the widget is hidden.
onKeyDown Is fired when a keyboard key is pressed.
onKeyUp Is fired when a keyboard key is released.
onKeyPress Is fired when a keyboard key is pressed or held down.
onMouseDown Is fired when a mouse button is clicked.
onMouseUp Is fired when a mouse button is released
onMouseEnter Is fired when the mouse pointer moves over the widget.
onMouseLeave Is fired when the mouse pointer moves out of the widget.
onMouseMove Is fired when the mouse pointer moves over nodes that are contained in the widget.
onSubmit Is fired when the form is submitted.
onReset Is fired when the form is reset.
onValidStateChange Is fired when the valid state of the form changes.
onLoaded Is fired when the form and the widgets inside the form have loaded.
onAsyncOK Is fired when the page has been successfully updated with AJAX.
onAsyncError Is fired when the page has failed to be updated with AJAX.
onAsyncTimeOut Is fired when the AJAX times out.
Table 3. Properties that can be configured for the Form widget by using the ECA editor.
Property Description
validateOnSubmit The validateOnSubmit property specifies whether validation is required for the widgets that are contained in the form. If the validateOnSubmit property is set to true and any of the widgets contained in the form fail during validation, the submit button will be disabled. The default value is true.
asyncStatus The asyncStatus property specifies the status of the AJAX. The status is provided as an HTTP status code.
asyncErrorMessage The asyncErrorMessage property provides an error message an AJAX. The error message is retrieved from the browser-side.
asyncCode The asyncCode property specifies the code that is used as the identifier for the AJAX.
Table 4. Functions that can be configured for the Form widget by using the ECA editor.
Function Description
isValid Returns a value of true if all the widgets that are contained in the form are valid according to client-side validation rules. Client-side validation rules are defined as Type parameters.
validate Returns a value of true if the form is valid. The validate function has the following two features that the isValid function does not have:
  • Highlights the widgets contained in the form that are not valid.
  • Calls the focus() method on the first invalid widget that is contained in the form.
submit Programmatically submits the form data to the server, and then the action that is specified in the defaultAction property is performed on the server.
callAsyncOperation Submits the form data in an asynchronous request, which executes the specified WebSphere Multichannel Bank Transformation Toolkit operation. After the operation has executed, the form is updated with the response data.


Feedback