• 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

State in Struts

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This may be somewhat difficult to explain, but I'll give it a shot. Your thought are appreciated.

I have a Struts w/ Tiles application I am developing. I have a sidebar containing menus A, B, and C. I would like for each of these menus to maintain their state when the user changes them (e.g., minimize/maximize) so that the next time the user logs into the system, it will show up exactly the same way. I have all of the code written to maintain the state in the persistence layer and everything works fine.

However, I have no idea on how I can get the user back to the exact page they were viewing when they change the state of a menu. Right now, I have it going back to the application home page, but that's really not user-friendly.

I was hoping you wise folks might have come across a similar situation and could help me address this issue:

How can I get the user back to the exact same page they were looking at when the state of Menu A, B, or C changes?

Thanks in advance for your help!
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Frameworks forum.
 
Ron Perich
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone have any thoughts on this?
 
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I think you can store the URL of the page in Session and then on change of each menu you can check to see if the session has any url then move to that url otherwise to the main page.

Will this help?

Regards
 
Ron Perich
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem with this approach is that we need to keep the exact parameters used becuase we are using LookupDispatchActions and using a methodToCall parameter to make sure we call the correct method.

We are going to process the request to save the state in another web screen so the main screen does not change. We'll hide the new window as much as possible and we'll close it upon the request being successfully processed.

Thanks for the input.
 
Always look on the bright side of life. At least this ad is really tiny:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic