This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Populate Collection of beans from Struts 2 form submission (jdk 1.4) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Populate Collection of beans from Struts 2 form submission (jdk 1.4)" Watch "Populate Collection of beans from Struts 2 form submission (jdk 1.4)" New topic
Author

Populate Collection of beans from Struts 2 form submission (jdk 1.4)

Piyush Joshi
Ranch Hand

Joined: Jun 10, 2011
Posts: 207

I am trying to populate a list of beans from a form:



In Action I have a list List myBeanList = new ArrayList(); which I want to populate with MyBean objects on submission of form. (but I cant use type parameters as my project is built on jdk1.4):

In struts 2 form I am doing

etc.

But on submission of the form I am getting 2 null elements in myBeanList.

I guess its because my project is using jdk 1.4. (I think this approach should work in jdk1.5 because of generics I can declare myBeanList to be of <MyBean> type)

Any suggesstions how I can do it in jdk 1.4?

Please help..


Piyush
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Populate Collection of beans from Struts 2 form submission (jdk 1.4)