Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested Iterator Tags  RSS feed

Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?!?!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!