Versions Compared

Key

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

...

Code Block
xml
xml
titleCreating a dynamic input field
<saf<s:textfield name="postalCode"/>

...

Code Block
xml
xml
titleUsing an expression to set the label
<saf<s:textfield label="%{getText("postalCode.label")}" name="postalCode"/>

...

Code Block
xml
xml
titleEvaluating booleans
<saf<s:select label="%{getText("state.label")}" name="state" multiple="true"/>

...

Code Block
xml
xml
titleEvaluating booleans (verbose)
<saf<s:select label="%{getText("state.label")}" name="state" multiple="%{true}"/>
Code Block
xml
xml
titleEvaluating booleans (with property)
<ww<s:select label="%{getText("state.label")}" name="state" multiple="allowMultiple"/>
Code Block
xml
xml
titleEvaluating booleans (verbose with property)
<ww<s:select label="%{getText("state.label")}" name="state" multiple="%{allowMultiple}"/>

...

Code Block
xml
xml
titleProbably wrong!
<ww<s:textfield label="%{getText("state.label")}" name="state" value="CA"/>

If a textfield is passed the value attribute "CA", the framework will look for a property naemd {{named getCa}. Generally, this is not what we mean. What we mean to do is pass a literal String. In the expression language, literals are placed within quotes

Code Block
xml
xml
titlePassing a literal value the right way
<ww<s:textfield label="%{getText("state.label")}" name="state" value="%{'CA'}" />

...