Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Struts2 problem with if tag inside iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 problem with if tag inside iterator" Watch "Struts2 problem with if tag inside iterator" New topic
Author

Struts2 problem with if tag inside iterator

Joe Tito
Greenhorn

Joined: May 03, 2011
Posts: 1

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

Joined: Sep 10, 2008
Posts: 270

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.


Time is what we want the most, but what we use the worst. -- William Penn
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2 problem with if tag inside iterator
 
Similar Threads
really need some help here concerning treeNode data types and the like. (data type issues really)
selectManyCheckbox in dataTable returns only the last selected item rather the whole list.
ActionForm Does Not Pick Up the Values of the Selected Check Boxes
stack
Iterators Advantages