You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Bernard Holland (JIRA)" <je...@portals.apache.org> on 2009/07/22 02:01:14 UTC

[jira] Created: (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

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-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Assigned: (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

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma reassigned JS2-1046:
------------------------------

    Assignee: Ate Douma

> 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
>            Assignee: Ate Douma
>            Priority: Critical
>             Fix For: 2.2.1
>
>
> 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-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Updated: (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

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma updated JS2-1046:
---------------------------

    Fix Version/s: 2.2.1

> 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
>             Fix For: 2.2.1
>
>
> 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-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


[jira] Resolved: (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

Posted by "Ate Douma (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma resolved JS2-1046.
----------------------------

    Resolution: Fixed

Good catch Bernard

This was a nasty bug in a complex part of the request state with session state synchronisation, which resulted in losing track of the current maximized window when it also had other render state parameters set.
Thanks for reporting!

> 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
>            Assignee: Ate Douma
>            Priority: Critical
>             Fix For: 2.2.1
>
>
> 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-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org