...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Creating a dynamic input field |
---|
|
<saf<s:textfield name="postalCode"/>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Using an expression to set the label |
---|
|
<saf<s:textfield label="%{getText("postalCode.label")}" name="postalCode"/>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Evaluating booleans |
---|
|
<saf<s:select label="%{getText("state.label")}" name="state" multiple="true"/>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Evaluating booleans (verbose) |
---|
|
<saf<s:select label="%{getText("state.label")}" name="state" multiple="%{true}"/>
|
Code Block |
---|
| xml |
---|
| xml |
---|
title | Evaluating booleans (with property) |
---|
|
<ww<s:select label="%{getText("state.label")}" name="state" multiple="allowMultiple"/>
|
Code Block |
---|
| xml |
---|
| xml |
---|
title | Evaluating booleans (verbose with property) |
---|
|
<ww<s:select label="%{getText("state.label")}" name="state" multiple="%{allowMultiple}"/>
|
...
Code Block |
---|
| xml |
---|
| xml |
---|
title | Probably 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 |
---|
title | Passing a literal value the right way |
---|
|
<ww<s:textfield label="%{getText("state.label")}" name="state" value="%{'CA'}" />
|
...