This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: put the criteria fields on valuestack when move to another page and get them back on return
 
Similar Threads
Struts 1: Selective Validation of Form
NX: Client business requiements vs given interface
Problem in : datatable
get data from valueStack inside an action
Another MUST requirement interpretation question