Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Repopulating the JSP with the newly selected value from a drop down list.

 
Angela Chint
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using struts 1.2.9.

I need to write a JSP where there is drop down list for the list of employees and the JSP fields will be populated with the data realted to the first employee in the list. Later once we change the to another employee element, the JSP should be populated with the new employee details.

If any one knows how to do this, please advice.

Thank you.
 
Ram Chhabra
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

You can solve your problem in following way:

Step1: While loading page get all the data from database and put that into Session.

Step2: While loading page then get the value from Session and populate the Drop Down list with employee names and also all the respective fields for the first employee.

Step3: Now when you want to choose other employee, choose other employee ,sbmit the page and populate the Form Bean and get your work done.

Hope this help you put.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic