• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 problem with if tag inside iterator

 
Joe Tito
Greenhorn
Posts: 1
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having problems trying to get an if statement to work inside of an iterator tag and i can't seem to figure it out.

addressTypeList is an array list of AddressType that has a boolean value 'selected' that will be true/false depending on if that current address is selected. I can't seem to figure out the proper syntax so that if statement evaluates as true.

Here is my iterator code.



Here is my action class, I believe I have the right getter methods provided. AddressInformationBean contains the addressTypeList List i'm iterating through.



Here is my AddressType class:

 
Robin John
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you find out the soulution ?

what are you trying to achieve ? if you just want to retain the value that the user has already selected then its not the write way, you can retain the selected value by setting the value in the property tag using OGNL.

and if you haven't already noticed, your code tags dont start and end correctly, you have some extra "<" in line2 and extra </value> tags there.... they might be causing some problems.

let me know if you need help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic