You can always throw a RestartResponseAtInterceptPageException(Page) and let Wicket do the redirect for you.
~ Thank you, Paul Bors On Fri, Feb 15, 2013 at 6:08 AM, vov <[email protected]> wrote: > Found good solution: > > @Override > protected void init() > { > getRootRequestMapperAsCompound().add(new > LoginHomePageMapper(getHomePage())); > } > > private static class LoginHomePageMapper extends MountedMapper > { > public LoginHomePageMapper(Class<? extends IRequestablePage> pageClass) > { > super("/", pageClass); > } > > @Override > public int getCompatibilityScore(Request request) > { > MySession session = (MySession) Session.get(); > if (session.isNewCreated()) > { > session.setNewCreated(false); > return Integer.MAX_VALUE; > } > > return Integer.MIN_VALUE; > } > > @Override > protected UrlInfo parseRequest(Request request) > { > return new UrlInfo(null, getContext().getHomePageClass(), > newPageParameters()); > } > } > > Thank you all for your efforts > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Redirect-to-the-HomePage-on-newSession-tp4656365p4656395.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
