struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Cnops" <>
Subject conditional iterate (3)
Date Mon, 08 Apr 2002 10:00:23 GMT

I made a typo in my request (closing the bean tag), but thas is not the main

What I want to do is:
1. iterate through some orderlines
2. if 'compname' of this orderline is not equal to 'compname' of the
previous orderline, write the compname, else do not.

How do I realise this? Do I have to declare a variable?

<logic:iterate id="element" name="orderlinebean" type="com.test.Orderline">
<logic:notEqual name="element" property="compname" value="-->if the compname
is the same as the previous line, don't write, else write the compname">
     <td width="23%">&nbsp;</td>
     <td width="18%"><bean:write name="element" property="compname"/></td>
     <td width="59%"><bean:write name="element" property="number"/></td>

Peter Cnops
Project Management - MediaTower
Digital Photography - PrePress - Digital Printing - Internet Services
Veldkant 29, B-2550 Kontich
Tel. 03 450 81 00 - Fax 03 450 81 09

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message