...
Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.
...
The xhtml theme renders out a two-column table. If a different layout is needed, do not write your own HTML. Create a new theme or utilize the simple theme.
...
Template-Related Attributes
...
Javascript-Related Attributes
...
Tooltip Related Attributes
...
General Attributes
...
...
Some tag attributes may not be utilized by all, or any, of the templates. For example, the form tag supports the tabindex
attribute, but none of the themes render the tabindex
.
Value/Name Relationship
In many of the tags (except for the form tag) there is a unique relationship between the name
and value
attributes. The name
attribute provides the name for the tag, which in turn is used as the control attribute when the form is submitted. The value submitted is bound to the name
. In most cases, the name
maps to a simple JavaBean property, such as "postalCode". On a submit, the value would be set to the property by calling the setPostalCode
mutator.
Likewise, a form control could be populated by calling a JavaBean accessor, like getPostalCode
. In the expression language, we can refer to the JavaBean property by name. An expression like "%{postalCode}" would in turn call getPostalCode
.
...
However, since the tags imply a relationship between the name
and value
, the value
attribute is optional. If a value
is not specified, by default, the JavaBean accessor is used instead.
...
...
While most attributes are exposed to the underlying templates as the same key as the attribute (${parameters.label}), the value
attribute is not. Instead, it can be accessed via the nameValue
key (${parameters.nameValue}). The nameValue
key indicates that the value may have been generated from the name
attribute rather than explicitly defined in the value
attribute.
...
Forms | The default ID is the action name. For example, "updateAddress". |
---|---|
Controls | The default ID is the form's name concatenated with the tag name. For example, "updateAddress_postalCode". |
Form labelposition propagation
When labelposition
attribute was defined for <s:form>
tag it will be propagated to all form elements, but if form element defines its own labelposition
it will take precedence over <s:form>
's attribute. Since 2.3.17.
Required Attribute
The required
attribute on many UI tags defaults to true only if you have client-side validation enabled, and a validator is associated with that particular field.
Tooltip
...
Form Tag Reference
Note | ||
---|---|---|
| ||
All tags that push something onto the value stack (like i18n or bean tags) will pop those objects from the stack when its processing completes. If a bean is instantiated with the bean tag ( |
- checkbox - renders a checkbox input field
- checkboxlist - renders a list of checkboxes
- combobox - renders a widget that fills a text box from a select
- datepicker - renders a date selection widget using JavaScript and DOM
- doubleselect - renders a double select widget, where the second drop down depends on the first
- head - renders the HEAD section for specific themes, such as CSS and JavaScript imports
- file - renders a file input field
- form - renders an input form
- hidden - renders a hidden form field
- label - renders renders a label
- optiontransferselect- renders an option transfer select component which is basically two select box with buttons in between allowing entries of each select to get transfer between each other.
- optgroup - render an optgroup tag to be used within a select tag
- password - renders a password textfield
- radio - renders a radio button
- reset - renders a reset form button
- select - renders a select
- submit - renders a submit button
- textarea - renders a textarea
- textfield - renders a textfield
- token - renders a hidden field to stop double-submission of containing forms
- updownselect - renders a select component with buttons to move the elements in the select component up and down