Form tags
Nexaweb XAL now provides tags to support form-based submission from the client UI to the server. Your application's client can submit form-based information using HTTP Post or Get instructions.
To declare a form, use the <formRequest> tag. The following table describes in the <formRequest> tag attributes:
Attribute | Description |
id | The id of this formRequest. |
HTTP Method | Specifies the HTTP method to use for the form submission: GET or POST GET - form data set gets appended to the URI specified by the action attribute (with a question-mark ("?") as separator) and this new URI passes to the processing agent. Use when the form causes no side-effects. For example, use the GET method for a database search. POST - form data set is included in the body of the form and sent to the processing agent. Use when the form causes side-effects. For example, used POST method to modify a database or subscription to a service. |
uri | Specifies the URI to which to sumbit the form. For example: |
target | Specifies the callback target. For example: |
onSuccess | Specifies the onSuccess callback. For example: |
onFailure | Specifies the onFailure callback. For example: |
<headers> </headers> | Optional section to specify headers. For example: |
<parameters> | Specifies hidden fields whose values are not rendered but are submitted with the form. For example, to store information between client/server exchanges. For example: |
To use a form in your application's UI, specify it as follows:
<textField name="customer_name" onCreate="form:myForm.addComponent(this)"/>
In addition, you can use form-base submission with validation syntax. For example:
<textField onCommand="mco:myMco.validate( mco:form ); mco:form1.submit()"/>