Hi, I am using two Wicket-Portlets in a Liferay 5.2.1 Portal. Both Portlets have a link which switches to another page within the portlet (via setResponsepage(new Page()) ). When I click the link in Portlet_1 the page within the portlet one changes as desired. After that I click the link in Portlet_2 and the page in Portlet_2 changes as desired, but i Portlet_1 the page changes to the Homepage.
I think that the problem might be in the getWicketURL(PortletRequest request, String pageType, String defaultPage) - method form WicketPortlet.java: protected String getWicketURL(PortletRequest request, String pageType, String defaultPage) { String wicketURL = null; // get the name of the wicket url paramater, as looked up from a request attribute called // WicketPortlet#WICKET_URL_PORTLET_PARAMETER_ATTR String wicketUrlParameterName = (String)request.getAttribute(WicketPortlet.WICKET_URL_PORTLET_PARAMETER_ATTR); if (request instanceof ActionRequest) { // try to lookup the passed in wicket url parameter wicketURL = request.getParameter(wicketUrlParameterName); } else if (request instanceof ResourceRequest) { wicketURL = ((ResourceRequest)request).getResourceID(); } else { // try to lookup the passed in wicket url parameter, suffixed with the portlet mode String parameterName = wicketUrlParameterName + request.getPortletMode().toString(); wicketURL = request.getParameter(parameterName); } // if the wicketURL could not be retrieved, return the url for the default page if (wicketURL == null) { wicketURL = getWicketConfigParameter(request, CONFIG_PARAM_PREFIX + pageType, defaultPage); } return wicketURL; } - In the RenderRequest for Portlet_2 the wicketUrlParameterName is for the Linklistener that was clicked. This works fine. - In the RenderRequest for Portlet_1 the wicketUrlParameterName is null. So by default the defaultPage of Portlet_1 is loaded, which is the Homepage. Is this the correct behaviour? I think the wicketURL for the RenderRequest for Portlet_1 should not be the defaultPage but instead the last rendered Page from Portlet_1. Is there a way to get the URL of the last page from Wicket? Thanks for any help! --Benjamin