• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

logic:iterate problem

 
Ranch Hand
Posts: 37
  • Likes 1
  • 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.
 
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.
 
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>
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic