...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<@saf<@s.form action="updateAddress"> <@saf.textfield label="Postal Code" name="postalCode" value="%{postalCode}"/> ... </@saf@s.form> |
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.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<@saf<@s.form action="updateAddress"> <@saf<@s.textfield label="Postal Code" name="postalCode"/> ... </@saf@s.form> |
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.
...