This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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)