• 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

nested iterate with parameterized getter

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, this isn't real easy to explain, but it's got me stumped at the moment.
I am working on an application that will display hundreds of different beans. To cut down on there being hundreds of value beans, I have created a generic value bean that uses getters and setters like so:

no problem so far, my JSPs use <nest:write property="displayValue(optionId)"/>. It works just fine.
Now I have can have child objects that occur more 0 to many times. (and there can be multiples of these, so I need to retrieve the list by type) So, I have implemented a getter to return an ArrayList like so...

so in my JSP, I have

I can get it to work if I add a <nest:root tag under the iterate.....

Since the work-around works, it looks a bit like there is a bug using nested iterate this way.
Also, the work-around fails when I need to use a form and get my results back...

since the html generates...

since the <nest:root> tag loses track of the parent.
without the <nest:root> I should get

so that the value will be assigned properly in the actionForm upon return

OK, anyone know what I need to do to get this to work?
[ February 08, 2004: Message edited by: Mike Cargal ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic