I am using Struts 1.3 with hibernate in my project. I have check boxes for employee names which are dynamically generated.
After I check a particular employee name, with change in the reference number, that particular employee name should be inserted as a new record with changes and the other employee names should be updated with the same previous reference number.
How to do it..? can any one please suggest me ideas or with the code snippets if some one has. It will be a great help..
Now my requirement is, consider we have 4 employees with same reference number.. in due course of time the reference number of two employees should be updated. So i check the check box against the employee name among one of the 4 employees and change the reference number of that employee.
Now I need to insert new reference no to the changed employee name and the other 3 employee names should be updated with the old reference number..
i am doing in my method something like this..
get the list of employees from the database for that session. check them with the employee names of the checked list. If they are same then check whether any check box is checked and also the value of reference no is changed. If so i am updating.
The problem here is its getting updated for all the employees, which should not be the case..