• 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

Iterating over JDOM Tree with nested tags

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi boys & girls... :-)
The problem is:
I have JDOM Document in ActionForm bean. In my jsp page I iterate over it. When I need only to display information - no problem:

Structure of tree:
-products
--category*
---subcategory*
----product*
-----model
-----producer




And I need a page, where I can edit all the fields. I decided to use nested tags. cindex and sindex - request parameters for current category and subcategory:


All right - this works fine until I pressed submit... Because JDOM element does not have method setChilren(). I didn't understand - because when html was rendered it is correct. One solution is to use <c:forEach/>. But it isn't nice... :-)
Any thoughts ? :-)
 
Vladimir Miguro
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've found solution myself... When I pressing submit, I'm going to the same page... so cindex и sindex params become uninitialized...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic