Try creating a method such as this;

private IRequestHandler renderPage(Class<? extends IRequestablePage>
pageClass, PageParameters pageParameters) {
        PageProvider pageProvider = new PageProvider(pageClass,
pageParameters);
        pageProvider.setPageSource(Application.get().getMapperContext());
        return new RenderPageRequestHandler(pageProvider,
RenderPageRequestHandler.RedirectPolicy.NEVER_REDIRECT);
}

You can call this method from your mapRequest(...) implementation, passing
in the page class and any parameters to go with it.

You don't theoretically need to specify the redirect policy but it is a
workaround due to a bug in 1.5-rc3 that issues 302 redirect when it
shouldn't be doing so.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Understanding-Wicket-1-5-page-mapping-tp3467619p3469896.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]

Reply via email to