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 Soft Skills this week in the Jobs Discussion 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: put the criteria fields on valuestack when move to another page and get them back on return