aspose file tools*
The moose likes Struts and the fly likes put the criteria fields on valuestack when move to another page and get them back on return Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "put the criteria fields on valuestack when move to another page and get them back on return" Watch "put the criteria fields on valuestack when move to another page and get them back on return" New topic
Author

put the criteria fields on valuestack when move to another page and get them back on return

Armin Vetek
Greenhorn

Joined: Aug 21, 2010
Posts: 29
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?

Regards,
Javanus


http://www.javanus.com/blogs
 
Don't get me started about those stupid light bulbs.
 
subject: put the criteria fields on valuestack when move to another page and get them back on return
 
Similar Threads
Another MUST requirement interpretation question
NX: Client business requiements vs given interface
get data from valueStack inside an action
Problem in : datatable
Struts 1: Selective Validation of Form