Question

I'm using gwtp and I have some troubles with the browsers back button. My DefaultPlace is a login page (root content). If the the login is correct, it directs you to a welcome page (MainPagePresenter) with a menu bar. This menu bar is always visible when going through its items. Clicking on an item reveals specific content (setInSlot) . When you use the back button it changes the token name to the token used before but you still see the old content.

My question is: How do I get back to the content which was shown before?

Was it helpful?

Solution

You shoud use the GWTP presenter lifecycle. When you use back button, the previous presenter is revealed. You should override onReveal() and onHide() to clean or save the presenter and view state. If you want clean a presenter when the place changed, you should override onHide() and in the body you can clean the view before the place change.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top