That's a cool tag. Another that I would be interested in is <logic:doesNothaveSuccesor> or <logic:isLast name="item">, which will evaluate the tag body only if you've reached the last item in the Collection being processed by <logic:iterate>
> -----Original Message----- > From: Christian Tschenett [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 06, 2002 4:32 PM > To: Struts Users Mailing List > Subject: Additional <logic:iterate> helper tags wanted > > > Hi, > > I am new to this list and to struts and/but I miss an additional > <logic:iterate> helper tag. I think the following sample > describes what I > want: > > <logic:iterate id="item" name="items"> > <bean:write name="item"/> > <logic:hasSuccessor name="item"> <%-- is item followed by > another item? --%> > ...is followed by... > </logic:hasSuccessor> > </logic:iterate> > > ...like... > > for (Iterator i = items.iterator(); i.hasNext(); ) { > String item = (String)i.next; > out.print(item); > if (i.hasNext()) out.print("...is followed by..."); > } > > ...in java. Can this be done without additinal tags? I assume > other users are > also interested in a <logic:hasSucceros>-like tag and so I > implemented it. > You can download the "patch" from > http://www.tschenett.ch/~chrigi/iterate-helpers.tgz and add > it to the stuts > codebase if other users like this simple helper tag too. > > just my 2 cents, > Chris > > > -- > 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]>