Hi Johan

I still don't manage to do redirection from my code.

I've even tried to do some redirection to other website or the base
URL of my app without success.

The code I use is the following :
package purgat.web.pages.user;

import org.apache.wicket.PageParameters;
import org.apache.wicket.ajax.AbstractAjaxTimerBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.pages.RedirectPage;
import org.apache.wicket.util.time.Duration;

import purgat.web.PurgatSession;
import purgat.web.SecuredBasePage;
import purgat.web.pages.base.IntroPage;

public class LogoutPage extends SecuredBasePage {
        public LogoutPage() {
                super();
                // Setting of the session's user to null to indicate the user 
isn't log
                // in anymore
                ((PurgatSession) getSession()).setUser(null);
                BookmarkablePageLink manualLink = new 
BookmarkablePageLink("linkTest",
                                IntroPage.class);
                add(manualLink);

                add(new AbstractAjaxTimerBehavior(Duration.seconds(5)) {
                        protected void onTimer(AjaxRequestTarget target) {
                                setRedirect(true);

                                // setResponsePage(new 
RedirectPage("http://www.google.com";));
                                getResponse().redirect("http://www.google.com";);
                        }
                });
        }
}

Instead of http://www.google.com I tried with the base URL of my app.
I'm using wicket 1.3 latest snapshot.

What's wrong with my code ??

Thanks in advance
ZedroS

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to