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
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: JS2-1046
                 URL: https://issues.apache.org/jira/browse/JS2-1046
             Project: Jetspeed 2
          Issue Type: Bug
          Components: Aggregation
    Affects Versions: 2.2.0
         Environment: Windows XP
Java 5.0
Jetspeed 2.2.0/Tomcat 6.0.18 binary distribution
            Reporter: Bernard Holland
            Priority: Critical


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscr...@portals.apache.org
For additional commands, e-mail: jetspeed-dev-h...@portals.apache.org

Reply via email to