-
Type:
Bug
-
Status: Closed
-
Resolution: Duplicate
-
Affects Version/s: 5.2.3, 6.2.0 CE GA1
-
Fix Version/s: None
-
Component/s: Legacy, Legacy > Extension Environment
-
Labels:None
-
Environment:liferay 5.2.3 tomcat 6 bundle
-
Liferay Contributor's Agreement:Accept
I have a portlet with a custom-portlet-mode defined:
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
<portlet>
...
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
<portlet-mode>other</portlet-mode>
</supports>
...
</portlet>
<custom-portlet-mode>
<portlet-mode>other</portlet-mode>
<portal-managed>false</portal-managed>
</custom-portlet-mode>
</portlet-app>
a Portlet class:
public class JSPPortlet extends GenericPortlet {
...
@RenderMode(name="view")
public void renderView(RenderRequest request, RenderResponse response) throws PortletException, java.io.IOException
@RenderMode(name="other")
public void renderOther(RenderRequest request, RenderResponse response) throws PortletException, java.io.IOException
}
and a view:
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<portlet:defineObjects />
<a href="<portlet:renderURL portletMode="other"></portlet:renderURL>">change mode</a>
=> but my mode "other" is ignored / lost and renderView() is called, request.getPortletMode() returns "view" mode.