Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

nested iterate with parameterized getter

Posts: 1
  • Mark post as helpful
  • send pies
  • 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 ]
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic