Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2-EE-GA_P02
-
Fix Version/s: EE-1.8.2.GA_P04
-
Component/s: Framework
-
Labels:None
-
Environment:Liferay 5.2.3 + Tomcat 6
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration
-
Workaround Exists:Yes
-
Workaround Description:
Description
This looks to be a regression from P01. The user has facesContext.externalContext.response.namespace in their page level EL expression and on first render is correctly set. The issue occurs after a server round trip where the value then becomes empty. To reproduce the issue in the attached portal test case, select the text inside of the inputTtext and hit enter. The label for the facesContext.externalContext.response.namespace becomes blank. Here is the snippet of code:
<ice:outputLabel value="#{facesContext.externalContext.response.namespace}" />
In a partial update (button click or hitting enter in an inputText) in P02, the PortletResponse acquired using the property response of the externalContext is null. However in P01, the PortletResponse is correctly set.
Test case is intended for deployment on Liferay 5.2.3 + Tomcat 6 and can be found under the "Test" portlet category.
<ice:outputLabel value="#{facesContext.externalContext.response.namespace}" />
In a partial update (button click or hitting enter in an inputText) in P02, the PortletResponse acquired using the property response of the externalContext is null. However in P01, the PortletResponse is correctly set.
Test case is intended for deployment on Liferay 5.2.3 + Tomcat 6 and can be found under the "Test" portlet category.
Activity
Field | Original Value | New Value |
---|---|---|
Attachment | sc10164.war [ 13281 ] |
Salesforce Case | [5007000000GvT5K] |
Environment | - | Liferay 5.2.3 + Tomcat 6 |
Fix Version/s | EE-1.8.2.GA_P04 [ 10280 ] | |
Assignee Priority | P2 | |
Assignee | Deryk Sinotte [ deryk.sinotte ] |
Workaround Description |
Use namespace stored as request attribute: public String getNamespace() { Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap(); Object namespace = requestMap.get("com.icesoft.faces.NAMESPACE"); if( namespace != null ){ return namespace.toString(); } return null; } |
|
Workaround Exists | [Yes] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #28584 | Thu Mar 29 10:41:17 MDT 2012 | deryk.sinotte | |
Files Changed | ||||
![]() ![]() |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #28586 | Thu Mar 29 10:57:02 MDT 2012 | deryk.sinotte | |
Files Changed | ||||
![]() |
Status | Open [ 1 ] | Resolved [ 5 ] |
Affects | [Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration] | |
Resolution | Fixed [ 1 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P2 |
I have confirmed the regression is between P01 and P02 and was introduced as part of this change:
http://jira.icefaces.org/browse/ICE-6197
This JIRA was to merge in substantial patches we'd made against P01 for other customers. The specific change in this case that is causing this problem relates to the RenderResponse reference. In the PortletExternalContext (our version of the JSF ExternalContext for portlet environments) was maintaining a reference to the original RenderResponse between Ajax requests. This was causing a significant memory leak during load testing and could only be solved by releasing the reference to the RenderResponse when the FacesContext.release() method was called. The side-effect is the regression where calling PortletExternalContext.getResponse() now returns null after the initial page request.
There is a workaround as we do store the namespace as a request attribute and this can be retrieved. Unfortunately, the strategy of using more direct EL syntax does not work:
<ice:outputText value="Namespace: #
{facesContext.externalContext.response.namespace}"/>
But it is possible to use some simple backing bean code and modify the EL to something like the following. Assume a managed bean called "Simple" that has the following method:
public String getNamespace() {
{ return namespace.toString(); }Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
Object namespace = requestMap.get("com.icesoft.faces.NAMESPACE");
if( namespace != null )
return null;
}
then the following EL can be used to get the namespace which will survive multiple Ajax requests:
<ice:outputText value="Namespace alternative: #
{simple.namespace}"/>
I've verified that this works against the test case. However, the response not being available may be considered a more serious issue and to fix it will require some effort in order not to re-introduce the memory issues that were originally addressed.