permaculture playing cards*
The moose likes Struts and the fly likes logic:iterate problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:iterate problem" Watch "logic:iterate problem" New topic

logic:iterate problem

Shashidahanu Iyyanar
Ranch Hand

Joined: Jun 22, 2005
Posts: 37
Hi All,
I am getting the following problem in my project.I am displaying list of customer names in the main page using the logic:iterate tag.But the problem is that I have to display the names based upon some condition within the tag.How is this possible using Struts?Can anybody give me suggestions regarding this?A example would be much better.Thanks in advance.
Seb Mathe
Ranch Hand

Joined: Sep 28, 2005
Posts: 225

Customer name (conditional) : name will be printed only if aCustomerProperty of the current Customer match aValue.

There's other ways to check a condition, look at the logic tags reference.

Regards,<br />Seb<br /> <br />SCJP 1.4
Pratik Lohia
Ranch Hand

Joined: May 05, 2005
Posts: 88
<logic:iterate id="abc" name="abcList">
<logic:equal name="abc" property="compare" value="xyz"> <bean:write name="abc" property="name" /> </logic:equal></logic:iterate>
It is sorta covered in the JavaRanch Style Guide.
subject: logic:iterate problem
Similar Threads
Dynamic links
displaying data from arrays with html:text
Problem using nested logic:iterate tags
problem referring to form elements from javascript
line feed problem