I have been struggling with creating an edit form out of a dataTable for a while. What I have is a datatable with output boxes and some commandLinks. When you click on one of the commandLinks the row of the data table changes from output to input allowing for a database update. There is also a save button to save the change. There are two steps to editing a record. 1. Click the edit link 2. Make the change and click the save link.
Step 1 is behaving correctly as far as I can tell but once you try to update the record, the changes made by the user are somehow being over-written by the original data from the List that feeds the datatable. I am sure I am just doing something stupid.
Here is my jsp
Here is the backing bean
The backing bean AccountBacking is in the request scope. I don't want to make it Session scope if at all possible. The outputAcct private method is just for debuggin purposes.
After saving data, call setAccountList passing new account list. I am not sure, this might solve your problem. what I see is, after save method is called the component is not updated to show new accounts list. Try and let me know.