You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Asenov <mA...@velti.com> on 2010/04/09 10:00:48 UTC

BookmarkablePageLink functionality in a Button

Hello, everyone!

I've got this logout page:

public class LogoutPage extends WebPage {

  public LogoutPage() {
    add(new Form<Object>("form").add(new AjaxButton("home") {

      private static final long serialVersionUID = 1L;

      @Override
      protected void onSubmit(AjaxRequestTarget arg0, Form<?> arg1) {
        setResponsePage(Calendar.class);
      }

    }));
  }

  @Override
  protected void onAfterRender() {

    super.onAfterRender();

    getSession().invalidate();
    RequestCycle.get().setRedirect(true);

  }

}

I used to have a BookmarkablePageLink instead of this button, that pointed to the very same page. However, obviously this button is related to the session and instead of sending me to the login page, it sends me to pageExpiredPage. Unfortunately, the new UI I have to use uses a button, so I had to use a button as well.
Can anyone assist me on this?

Best,
Martin