forEachStatus"

From Documentation
m
Line 6: Line 6:
 
<source lang="xml" >
 
<source lang="xml" >
 
  <zk>
 
  <zk>
  <zscript>
 
grades = new String[] {"Best", "Better", "Good"};
 
  </zscript>
 
 
   <listbox width="100px">
 
   <listbox width="100px">
     <listitem label="${forEachStatus.index}: ${each}" forEach="${grades}"/>
+
     <listitem label="${forEachStatus.index}: ${each}" forEach="Best, Better, Good"/>
 
   </listbox>
 
   </listbox>
 
  </zk>
 
  </zk>

Revision as of 07:18, 15 November 2010

forEachStatus – org.zkoss.zk.ui.util.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.

 <zk>
   <listbox width="100px">
     <listitem label="${forEachStatus.index}: ${each}" forEach="Best, Better, Good"/>
   </listbox>
 </zk>

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.

Version History

Version Date Content
     



Last Update : 2010/11/15

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.