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.
posted 10 years ago
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.