blob: 1d48ed42bb605994ee30fc241a1b2c038e56fcee [file] [log] [blame]
<html>
<body>
<p>
Check the behavior of If, Else, and For.
</p>
<span jwcid="@If" condition="ognl: !false">Show text!</span>
<span jwcid="@Else">Do not show this</span>
<span jwcid="@If" condition="false">Do not show this either</span>
<span jwcid="@Else">But show this too!</span>
<span jwcid="for1@For" source="ognl: { 'one', 'two' }">
for1 <span jwcid="@Insert" value="ognl: components.for1.index"/> : <span jwcid="@Insert" value="ognl: components.for1.value"/>
</span>
<p>Rewinded index count: <span jwcid="@Insert" value="ognl: rewindedIndexes.size()"/></p>
<span jwcid="inds@For" source="ognl: rewindedIndexes" element="p">
Rewinded index <span jwcid="@Insert" value="ognl: components.inds.index"/> is <span jwcid="@Insert" value="ognl: components.inds.value"/>
</span>
<p>Rewinded value count: <span jwcid="@Insert" value="ognl: rewindedValues.size()"/></p>
<span jwcid="vals@For" source="ognl: rewindedValues" element="p">
Rewinded value <span jwcid="@Insert" value="ognl: components.vals.index"/> is <span jwcid="@Insert" value="ognl: components.vals.value"/>
</span>
<ul>
<li jwcid="tags@For" source="ognl: { '1' }" renderTag="true" informal="informal-value">Render tag</li>
</ul>
<ul>
<li jwcid="noTags@For" source="ognl: { '1' }" renderTag="false" informal="informal-value">Do not render tag</li>
</ul>
<span jwcid="@Form">
<span jwcid="@If" condition="ognl: !false">Show form text!</span>
<span jwcid="@Else">Do not show form text</span>
<span jwcid="@If" condition="false">Do not show this form text either</span>
<span jwcid="@Else">But show this form text too!</span>
<span jwcid="for2@For" source="ognl: { 'uno', 'due' }"
index="ognl: index" value="ognl: value">
for2 <span jwcid="@Insert" value="ognl: components.for2.index"/> : <span jwcid="@Insert" value="ognl: components.for2.value"/>
</span>
<span jwcid="for3@For" source="ognl: { @java.util.Locale@US, @java.util.Locale@GERMANY }"
fullSource="ognl: @java.util.Locale@getAvailableLocales()" keyExpression="toString()"
index="ognl: index" value="ognl: value">
for3 <span jwcid="@Insert" value="ognl: components.for3.index"/> : <span jwcid="@Insert" value="ognl: components.for3.value"/>
</span>
<span jwcid="for4@For" source="ognl: { @java.util.Locale@US, @java.util.Locale@GERMANY }" keyExpression="toString()"
defaultValue="ognl: @java.util.Locale@ENGLISH"
index="ognl: index" value="ognl: value">
for4 <span jwcid="@Insert" value="ognl: components.for4.index"/> : <span jwcid="@Insert" value="ognl: components.for4.value"/>
</span>
<span jwcid="for5@For" source="ognl: items" fullSource="ognl: allItems" index="ognl: index" value="ognl: value">
for5 <span jwcid="@Insert" value="ognl: components.for5.index"/> : <span jwcid="@Insert" value="ognl: components.for5.value"/>
</span>
<span jwcid="for6@For" source="ognl: items" match="false" index="ognl: index" value="ognl: value">
for6 <span jwcid="@Insert" value="ognl: components.for6.index"/> : <span jwcid="@Insert" value="ognl: components.for6.value"/>
</span>
</span>
</body>
</html>