Uploaded image for project: 'Jetspeed 2 (Retired)'
  1. Jetspeed 2 (Retired)
  2. JS2-1046

Action processing for maximized portlet which sets any render parameter on ActionResponse without changing window state causes portal page to resort to "normal" window state rendering whereby all portlets are rendered instead of only maximized one

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.2.0
    • 2.2.1
    • Aggregation
    • None
    • Windows XP
      Java 5.0
      Jetspeed 2.2.0/Tomcat 6.0.18 binary distribution

    Description

      Steps to reproduce:
      1. Modify the BonjourMonde portlet from the Jetspeed 2.2.0 tutorial creating an action in which a render parameter is set on ActionResponse without changing window state, as in the following:
      // Begin BonjourMonde.java
      package org.apache.portals.tutorials;

      import java.io.IOException;

      import javax.portlet.ActionRequest;
      import javax.portlet.ActionResponse;
      import javax.portlet.GenericPortlet;
      import javax.portlet.PortletException;
      import javax.portlet.PortletURL;
      import javax.portlet.ProcessAction;
      import javax.portlet.RenderRequest;
      import javax.portlet.RenderResponse;

      public class BonjourMonde extends GenericPortlet {

      @Override
      protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException

      { response.setContentType("text/html"); PortletURL url = response.createActionURL(); url.setParameter(ActionRequest.ACTION_NAME, "refresh"); response.getWriter().println("<form name=\"form" + response.getNamespace() + "\" method=\"post\" action=\"" + url.toString() + "\"/>"); response.getWriter().println("<b>Bonjour: View Mode</b>"); response.getWriter().println("<input type=\"submit\" value=\"Refresh\"/>"); response.getWriter().println("</form>"); }

      @ProcessAction(name="refresh")
      public void refreshAction(ActionRequest request, ActionResponse response) throws PortletException, IOException

      { response.setRenderParameter("some", "value"); }


      }
      // End BonjourMonde.java
      2. Include above portlet in portal page and maximise the portlet
      3. Invoking the "refresh" action will cause the portal page to resort to "normal" window state rendering whereby all portlets are rendered instead of only maximized one

      This behaviour was not observed in Jetspeed 2.1.3 and would seem to violate the Portlet specification:
      From JSR-286:
      PLT.7.1.2 Including a Portlet Mode or a Window State

      L38. If the window state is not set for a URL, it must have the
      window state of the current request as defaultxlv

      Attachments

        Activity

          People

            ate Ate Douma
            bernardmh Bernard Holland
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: