Unfortunately, I need to get all kinds of approval to use JSTL, is there no Struts tag that will do this?
TIA, J -----Original Message----- From: atta-ur rehman [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 02, 2004 5:04 PM To: Struts Users Mailing List Subject: Re: Need an alternative to bean:define Is JSTL an option? I find Struts Logic tag hard to read! If so, I think this should do: <c:set var="lastCN" value=""/> <logic:iterate...> <c:if test="${widget.clinetName != lastCN}"> .... </c:if> <c:set var="lastCN" value="${widget.clientName}"/> </logic:iterate> HTH. Of course this is from top of my head, i haven't tried it. ATTA On Tue, 02 Nov 2004 16:16:25 -0800, Janice <[EMAIL PROTECTED]> wrote: > My brain has stopped working. I need an alternative to bean:define. > > What I'm TRYING to do is iterate through a list, displaying a certain > bit of code only when its different than the last iteration > (grouping). > > Here's a snip: > > <bean:define id="lastClientName" value="" /> > > <logic:iterate id="widget" name="widgets"> > > <logic:notEqual name="widget" property="clientName" > value="<%=lastClientName%>"> > <tr> > <td colspan=all> > client: <bean:write name="widget" property="clientName" /> > </td> > </tr> > <bean:define id="lastClientName" name="widget" > property="clientName" /> > </logic:notEqual> > > End of snip. > > This won't compile since bean "lastClientName" has already been > defined. I can't change my version of Struts. > > What would be some clean syntax to use instead? > > Thanks so much in advance! > > J > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]