You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Gabor Szokoli <sz...@gmail.com> on 2007/12/13 01:13:34 UTC

IUnauthorizedComponentInstantiationListener: keep the page paramaters

Hi again,

My WebApplication implements
IUnauthorizedComponentInstantiationListener. (wicket 1.3)
My problem is I can't access the page parameters in the
onUnauthorizedInstantiation(final Component component) method,
((Page)component).getPageParameters() returns null.

Is there a pattern for saving which page the user attempted to access
with what parameters, and delivering it after a successful login?


Thanks:

Gabor Szokoli

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


Re: IUnauthorizedComponentInstantiationListener: keep the page paramaters

Posted by Gabor Szokoli <sz...@gmail.com>.
Solved in-house, sorry about the noise.

I was looking at the wrong place, I should have used
continueToOriginalDestination in the login form submit code.

Again, for the sake of completeness, here's the pattern to preserve
the bookmarkable URL complete with page parameters across the login
procedure:

@Override
public void onSubmit() {
if (authenticateUser(...)) {
 if(!continueToOriginalDestination()) {
  setResponsePage( defaultPage... );
 } else {...}
}

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