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 Iterator Tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Nested Iterator Tags" Watch "Nested Iterator Tags" New topic

Nested Iterator Tags

matt eggbeers

Joined: Mar 11, 2005
Posts: 14
I have 2 beans 1.) TestBean 2.) DrugBean. TestBean has 2 ArrayList of DrugBeans. The beans are populated from the data base and all is well. Now I have another ArrayList in the ActionFormBean called tests, so in my OpenTestsAction I create a new form, pass it the array of tests, set the form to the request, and forward it to the JSP.

Now, the jsp displays the contents of all beans in the <html:text> boxes great, but when the form is submitted, only the test beans (outside iterator tag) are getting to the action. Another words the array inside the array is not getting set properly.

Below is code snippets to help understand,
Thanks for any help / suggestions,

First of all here is the TestBean code, the drug bean is just a regular bean, nothing special so i am not going to post it;

Next is the ActionFormBean

Finally is the jsp...

LIKE I SAID IT ALL GETS DISPLAYED GREATE, BUT WHEN I TRY TO SUBMIT ONLY THE drug array does not get set in the test array...Any Suggestions?!?!
I agree. Here's the link:
subject: Nested Iterator Tags
It's not a secret anymore!