jQuery in Action, 2nd edition
The moose likes Struts and the fly likes Iterating over JDOM Tree with nested tags Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Iterating over JDOM Tree with nested tags" Watch "Iterating over JDOM Tree with nested tags" New topic
Author

Iterating over JDOM Tree with nested tags

Vladimir Miguro
Greenhorn

Joined: May 18, 2009
Posts: 5
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

Joined: May 18, 2009
Posts: 5
I've found solution myself... When I pressing submit, I'm going to the same page... so cindex и sindex params become uninitialized...
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Iterating over JDOM Tree with nested tags
 
Similar Threads
finding selected record of nested:iterate using nested:form
Topic: finding selected record of nested:iterate using nested:form
form bean is not getting updated upon submit in jsp
Topic: finding selected record of nested:iterate using nested:form
Nested Beans Problem