Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting an EmpID Name pair from a jsp into an ActionForm

 
Pankaj Mulay
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

on my jsp I have an input where I select multiple employees using checkboxex
which are in the employee ID name structure.

Now I want to get both the emp ID and name fields on my ActionForm that to in the pairs as every emp id is associated with a specific name.

Can anyone Please tell me how to achieve that.

Thanks in advance.
waiting for reply.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create an "Employee" class as a JavaBean that has an ID and a name property, as well as any other information about an employee that you need. Then, create an "employees" property of your ActionForm bean that is an ArrayList of Employee objects. You can then manipulate and display these objects using "indexed properties". Here is a link that explains how to do this. This link explains some extra steps you must take if your AcitonForm is in request scope.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic