Form
A Form component must enclose the other form element components (such as TextField and Checkbox). It manages the rendering of the form as well as processing when the form is submitted (known as "rewinding" the form). In traditional web applications, the developer is responsible for providing a name for each form and each form control element; in Tapestry, the Form component generates its own unique name, and unique names for each enclosed component ... this is necessary to support advanced features such as loops within forms.
See also: org.apache.tapestry.form.Form, IValidationDelegate
Parameters
Name | Type | Direction | Required | Default | Default Binding | Description |
---|---|---|---|---|---|---|
method | string | in | no | post | literal | Method used by the form when it is submitted. |
listener | IActionListener | in | no | listener | Default listener to be invoked when the form is submitted. Invoked after the form has rewond (all enclosed components have read query parameters and updated server-side properties), and after any listeners related to submit components (Submit, ImageSubmit, etc.) have been invoked. | |
cancel | IActionListener | in | no | listener | Listener used when a form is cancelled, overriding the default listener. Forms are cancelled by invoking the client-side JavaScript function document.form-name.events.cancel(). A cancelled form does not rewind. If no cancel listener is provided, then the normal listener will be used. | |
refresh | IActionListener | in | no | listener | Listener used when a form is refreshed, overriding the default listener. A refreshed form bypasses input field validation on the client side, though validation still occurs on the server side. If no refresh listener is provided, then the normal listener will be used. | |
stateful | boolean | in | no | true | ognl | If true (the default), then an active session is required when the form is submitted, if there was an active session when the form was rendered. |
direct | boolean | in | no | true | ognl | If true (the default), then the more efficient direct service is used. If false, then the action service is used. The action service requires rewinding of the entire page, and is rarely (if ever) used. |
delegate | IValidationDelegate | in | no | default instance | ognl | An object that tracks user input and input field errors, and decorates fields and field labels. This is typically overriden to provide an application-specific look and feel. |
clientValidationEnabled | boolean | in | no | false | ognl | If true, then client-side validation will be enabled for components that support it (such as TextField). |
Body: allowed
Informal parameters: allowed
Reserved parameters: action, enctype, name, onsubmit, onreset
A note about clientValidationEnabled: This refers to the revamped input validation support that debuts in Tapestry 4.0. The older validation system, centered around the ValidField component, still requires that clientScriptingEnabled be set on individual IValidators.