The above fields are editable (except employee id) and have been loaded dynamically on basis of a search mechnism (to load employees with specific properties.) Since they have been loaded dynamically, the names of all fields are the same on the UI. They look like this.
Similarly for phone. But phone may or may not exist on the UI depending on whether an employee has a phone or not.
The entire form has one submit button, mapped to an updateAction to update the new details put in by the user.
My Action form contains a String array txtname, String array txtage and and String array txtphone. When the details on the UI are captured in the above properties, in order to decipher which employee name, age or phone corresponds to which employee id, I have appended the employee id to the values of the textboxes.
BUT I think there must be a way in which i could capture these details in a better manner (in objects). So, in the my ActionForm i could have a list of Employee objects, each of which would contain the details submitted from the UI. But i am not able to figure out how to go about this.
First of all, can my ActionForm contain an Employee List which could be populated automatically with details from the UI??
I am simply looking for a better way to do this. Please advise.
subject: Capturing a list of details from the UI to ActionForm