Versions Compared

Key

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

...

the following code uses the Tag Syntax:

Code Block
<ww<s:iterator value="cart.items">
   ...
   <ww<s:textfield label="'Cart item No.' + #rowstatus.index + ' note'" 
                 name="'cart.items[' + #rowstatus.index + '].note'" 
                 value="note" />
</wws:iterator>

this is somewhat counter intuitive to normal HTML tag behaviour, and you get loads of single quotes. Now the same example in altSyntax:

Code Block
<ww<s:iterator value="cart.items">
   ...
   <ww<s:textfield label="Cart item No. %{#rowstatus.index} note" 
                 name="cart.items[%{#rowstatus.index}].note" 
                 value="%{note}" />
</wws:iterator>

Only expressions enclosed with %{} are evaluated. The code is shorter and clearer, very similar to JSTL EL usage. Quoting problems, eg. with javascript function calls, are avoided.

...