You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by brazz <al...@man.eu> on 2013/07/26 16:38:03 UTC

Preserve state of wicket page after page navigation

Hi,

i have a Wicket Page that opens a modal dialog via javascript. The content
of the modal dialog is again a wicket page that i forward to. The page of
the modal dialog just renders a message and can be closed via javascript.
The url of the target page is calculated as follows:

String url = RequestUtils
		.getApplicationRelativePath(page, FinSearchHelpPage.class, params);
		add(new OpenModalDialogBehaviour(url){
			
			private static final long serialVersionUID = -8760975185570597361L;

			@Override
			protected String getEventListener() {
				return "onclick";
			}
		});

actually this works, as the page is loaded in the upper i frame. 

As a lot of different states on the source page are set via ajax, i want the
source page to be left completely "untouched", after the dialog is closed
via javascript. 

But when processing tasks in RequestCylce happen, the model objects of the
source page are detached and i get a NEP on the model objects, on execution
of the next ajax call (model object in onclick is null), after the modal
dialog is closed.

I tried overriding the detach() method in the DetachableModel that i use and
even in the source page but it didn't help.

What i need is a way to intercept the RequestCycle at a certain point, so
that the source page is left completely "untouched". 

The forward to the wicket page in the modal dialog shouldn't affect the
source page at all.

I debugged the RequestCycle processing with its different steps but couldn't
find such an interception point.

Thanks for any suggestions.


P.S. using wickets internal modal dialog is not an option, i need to use our
standards.




--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Preserve-state-of-wicket-page-after-page-navigation-tp4660511.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Preserve state of wicket page after page navigation

Posted by brazz <al...@man.eu>.
Now i tried to use multi window support feature of wicket. I think this would
be most elegant solution.

In every page i do:
super(ESSession.get().createAutoPageMap());

And in the application i set:
getPageSettings().setAutomaticMultiWindowSupport(true);

But still the objects are getting detached, so i get NEPs.
Shouln't it behave like every Page has its own distinct state?

Thanks for any hints!



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Preserve-state-of-wicket-page-after-page-navigation-tp4660511p4660542.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org