• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic