Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment:

Update nomenclature

...

Code Block
xml
xml
titleUsing Expressions to populate a form for editing
<@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
xml
xml
titlePopulating a form for editing, the easy way
<@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.

...