Hi guys,

I encountered a problem in the stateless form, which is in my login page.

The form code is as below:

public final void onSubmit() {
    // Get session info
    DataStoreSession session = (DataStoreSession)getSession();

    // Sign the user in
    if (session.authenticate(username, password)) {
        if (!continueToOriginalDestination()) {
            setRedirect(true);
            setResponsePage(new DataStoreTabbedPanelPage());
        }
    }
    else {
        error(getLocalizer().getString("loginError", this, "Unable to sign
you in"));
    }
}

DataStoreTabbedPanelPage is a stateful page with all the components and
panels. The session is also created after submit. However, when I click
other pages, it gives me Expired Page. The reason I want to redirect because
when the user successfully login, and press F5, firefox gives them a popup
for them to resubmit the form and create another session.

Is there any problem with the setRedirect(true) in stateless form?

Matthew Kwong
-- 
View this message in context: 
http://www.nabble.com/StatelessForm-and-setRedirect%28true%29-in-the-onSubmit-method-tf3347688.html#a9308281
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to