forEachStatus"
From Documentation
m |
|||
Line 1: | Line 1: | ||
{{ZUMLReferencePageHeader}} | {{ZUMLReferencePageHeader}} | ||
− | + | = forEachStatus – <javadoc type="interface">org.zkoss.zk.ui.util.ForEachStatus</javadoc> = | |
The status of an iteration. It is an instance of <javadoc type="interface">org.zkoss.zk.ui.util.ForEachStatus</javadoc>. ZK exposes the information relative to the iteration taking place when evaluating the iterative element. | The status of an iteration. It is an instance of <javadoc type="interface">org.zkoss.zk.ui.util.ForEachStatus</javadoc>. ZK exposes the information relative to the iteration taking place when evaluating the iterative element. | ||
Line 20: | Line 20: | ||
</source> | </source> | ||
− | + | =Version History= | |
{| border='1px' | width="100%" | {| border='1px' | width="100%" |
Revision as of 11:29, 18 November 2010
forEachStatus – ForEachStatus
The status of an iteration. It is an instance of ForEachStatus. ZK exposes the information relative to the iteration taking place when evaluating the iterative element.
<listbox width="100px">
<listitem label="${forEachStatus.index}: ${each}" forEach="Best, Better, Good"/>
</listbox>
Note: forEachStatus.index is absolute with respect to the underlying collection, array or other type. For example, if forEachBegin is 5, then the first value of forEachStatus.index with be 5.
To retrieve the information of the outer iterator if an iteration is nested, you could use ForEachStatus.getPrevious().
<listbox forEach="${matrix}">
<listitem label="${forEachStatus.previous.each.label}: ${each}" forEach=${each.items}/> <!-- nested-->
</listbox>
Version History
Version | Date | Content |
---|---|---|