File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts 1.3:  A good way to save the latest search parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.3:  A good way to save the latest search parameters" Watch "Struts 1.3:  A good way to save the latest search parameters" New topic
Author

Struts 1.3: A good way to save the latest search parameters

Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Hello,

I have a simple search form with 6 parameters.

After the search is done, the user has the option to click "delete" on one of the results and delete a record. After Delete, I want to send user back to repeat the search with the same search parameters. I can do this in a brute force fashion, but I wonder if there is an established way in struts to reuse the search form bean?

I've Done the following:
save search form bean in session and use it if the app finds itself at the search results action with a null search form. (the search form is never null, so I check for null fields). If all the fields are null, then I revert to using the search form saved in the session.

while this works, it seems over complicated and I'm writing to see if there is another way.
 
 
subject: Struts 1.3: A good way to save the latest search parameters