Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 5.2.3, 6.2.0 CE GA1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      liferay 5.2.3 tomcat 6 bundle
    • Liferay Contributor's Agreement:
      Accept

      Description

      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

      { log.info("render view"); // render view.jsp }

      @RenderMode(name="other")
      public void renderOther(RenderRequest request, RenderResponse response) throws PortletException, java.io.IOException

      { log.info("render edit"); // render view.jsp }

      }

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 36 weeks, 6 days ago