Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logic:iterate problem

 
Shashidahanu Iyyanar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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.
 
Pratik Lohia
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<logic:iterate id="abc" name="abcList">
<logic:equal name="abc" property="compare" value="xyz"> <bean:write name="abc" property="name" /> </logic:equal></logic:iterate>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic