For us this works in the Application class:
/**
* @see wicket.Application#getHomePage()
*/
public Class<? extends Page> getHomePage()
{
PortletRequestContext prc = (PortletRequestContext)
RequestContext.get();
if (PortletMode.EDIT.equals(prc.getPortletRequest().getPortletMode()))
{
return EditPage.class;
}
return HomePage.class;
}
On 19-7-2010 11:34, Gareth Western wrote:
Is anyone here using Wicket in a portal (i.e. for portlets)? I'm trying to
figure out how to switch pages when the user changes Portlet mode (e.g. VIEW
-> EDIT).
Looking through the source, it looks like the responsible method
(WicketPortlet#getWicketConfigParameter(PortletRequest request, String
paramName, String defaultValue)) doesn't do anything except return the given
defaultValue, whereas I was expecting it to try and look up the page for the
given paramName...! :(
Has anyone got around this problem?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org