put the criteria fields on valuestack when move to another page and get them back on return
posted 5 years ago
My application consists from two forms. The first form is used to list the data and it has two parts: above are some criteria fields and a search button and a table below. User could choose a record in the table and a form to edit a record is opened. User modifies the data and click save button. The second form is closed and the user is redirected to the list form(the first one) again.
The criteria fields are put on the valuestack when I pressed a search button in the first form. The criteria fields are removed from the valuestack when I open a form for editing the data. I would like that the choosen values from the criteria fields in the first form remains the same as they were before I open an editing form on return from editing form.
I put the values from the criteria field to the session at the moment, and when the editing form is closed, I read the values from the session to the criteria fields on the first form.
I would like to know if there is amore elegant solution to handle such situation with struts2?