I don't believe there is a clean way to do that with "logic:iterate".  You might 
consider writing an enhancement request in Bugzilla for this, if it's important to you.

Also, assuming you don't need indexed tags, I believe you could use the JSTL 
"c:forEach" tag for this, as it has a "step" attribute.  If you used the JSTL with 
this, you could even continue to use "logic:iterate", but wrap your code with a 
"<c:if>" testing your index evalue for "evenness".

> -----Original Message-----
> From: Andy Kriger [mailto:[EMAIL PROTECTED]]
> 
> Is there any way to set an iteration increment on the iterate tag? For
> example, iterate through the array returning every 2nd item.
> 
> If not, can anyone tell me how I might do this without resorting to
> scriplets (or only using them minimally)? Here's the code I'm 
> trying to use.
> The first TD is the long_desc field of array[idx] in myBean. How can I
> increment idx so I can get the next item? (maybe I'm being 
> slow since I
> haven't had my coffee yet)
> 
> <logic:iterate id="idx" name="myBean" property="array" 
> scope="session">
>       <tr>
>       <td><bean:write name="idx" property="long_desc"/></td>
>       <td><bean:write name="???" property="long_desc"/></td>
>       </tr>
> </logic:iterate>
> 
> thx
> andy
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to