File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes nested logic:iterate and Struts submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "nested logic:iterate and Struts submit " Watch "nested logic:iterate and Struts submit " New topic

nested logic:iterate and Struts submit

joe priv

Joined: Oct 06, 2007
Posts: 9

I am using Spring, Hibernate and Struts to collect a hierarchy (ArrayList) of data from a view (.jsp). I can **display** the parent and nested children in the hierarchy using either nested logic:iterate or nested:iterate tags from the view without a problem.

I got this working fine for a single level of children using index properties

My question is around multiple nested iterates and submitting the form. I am unable to get this to work. Does anyone have any direct experience with this? If so can you point me towards a working example.

collect user input here and have it post back to the the javabean

When I debig my Action I never see the second level children collection being populated. The html form looks like this:


I was thinking that Struts (BeanUtils) will populate the ActionForm on a submit, but it just isn't doing anything.

Thanks and any help!

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Do you have indexed getters for each level? Not only the ActionForm bean, but each JavaBean in the tree must have indexed getters. Example:

Consultant, Sima Solutions
joe priv

Joined: Oct 06, 2007
Posts: 9
Thanks! That makes sense. I will try this.
joe priv

Joined: Oct 06, 2007
Posts: 9
That worked! Thanks
I agree. Here's the link:
subject: nested logic:iterate and Struts submit
It's not a secret anymore!