search the archives for this. this is a common mistake and has been
explained/corrected on this mailing list a multitude of times.
-igor
On 11/2/07, auron <[EMAIL PROTECTED]> wrote:
>
> Hey all,
>
> Sorry to be the wicket newbie, but I was wondering if you guys could help me
> to understand how Links work.
>
> I understand that when you do Link(SomePage.class), it calls the zero param
> constructor of SomePage, and when you do Link(new SomePage(someParams)) you
> can call other constructors, but besides this, what are the other
> differences?
>
> I have a LoginPage that renders a login form if the zero param constructor
> is called, and when LoginPage(false) is called, it signs out the user first
> and then renders a login page. The problem is that when I use Link(new
> LoginPage(false)) to sign out the user, it does indeed sign out the user,
> but a wicket page expired message is rendered rather than the LoginPage.
>
>
> public LoginPage() {
> this(true);
> }
>
> public LoginPage(boolean isLogin) {
> Model simpleUser = new Model(new SimpleUser());
> add(new SignInForm("loginform", simpleUser));
> ACPSession session = getACPSession();
> if (isLogin) {
> if (session.isSignedIn()) {
>
> error(getLocalizer().getString("login.errors.alreadysignedin",
> LoginPage.this));
> }
> } else {
> if (session.isSignedIn()) {
> info(getLocalizer().getString("login.info.signedout"));
> session.signOut();
> //after this, "Page Expired" error.
> }
> }
> }
>
> Hope this made sense, any help is greatly appreciated.
> Thank you,
> jin
> --
> View this message in context:
> http://www.nabble.com/difference-between-Link%28SomePage.class%29-and-Link%28new-SomePage%28%29%29-tf4738073.html#a13549579
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]