• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Piyush Joshi
Ranch Hand
Posts: 207
Eclipse IDE Firefox Browser jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic