• 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

logic:iterate and objects containing objects

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to render data with the logic:iterator tag that contains an array of objects containing another array of objects.
Class Parent {
private Object[] children
putChilder()...
getChildren()...
}

I then put a array of objects using request.setAttribute("parents")

Then i want to iterate using logic:iterate
<logic:iterate name="parents" id="parent">
<logic:iterate id="children" name="parent">
<bean:write somestuff

How to do this? I can't get hold of the children objects somehow..
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just go one more level deep to get an individual child. Example:

[ September 10, 2007: Message edited by: Merrill Higginson ]
 
robert isidorson
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sometimes its easy.. Thank you
 
reply
    Bookmark Topic Watch Topic
  • New Topic