struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vaddiyar, Raghuramudu" <Raghuramudu.Vaddi...@sisclear.com>
Subject RE: conditional iterate (3)
Date Mon, 08 Apr 2002 10:49:24 GMT
Better avoid array elements with same "compname" ...

in otherwords create the array elements with unique "compname" ..avoid
elements
with same "compname"...

-----Original Message-----
From: Peter Cnops [mailto:peter@mediatower.be]
Sent: Monday, April 08, 2002 12:00 PM
To: struts-user@jakarta.apache.org
Subject: conditional iterate (3)


Hi,

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

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">
  <tr>
     <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>
  </tr>
</logic:notEqual>
</logic:iterate>


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
http://www.mediatower.be



--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


****************************************************************************
The content of this e-mail is intended only for the confidential use of the
person addressed. If you have received this message in error, please notify
us immediately by electronic mail, by telephone or by fax at the above num-
bers.

E-mail communications are not secure and therefore we do not accept any res-
ponsibility for the confidentiality or altered contents of this message.

Please be aware that SIS Group and its subsidiary companies cannot accept
any orders or other legally binding correspondence with a participant as
part of an E-mail. The views expressed above are not necessarily those held
by SIS Group and its subsidiary companies and not binding for them.
****************************************************************************



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message