• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2 problem with if tag inside iterator

 
Greenhorn
Posts: 1
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic