Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Duplicate
-
Affects Version/s: 1.7DR#2
-
Component/s: None
-
Labels:None
-
Environment:Platform independent issue
-
ICEsoft Forum Reference:
Description
This is a problem that has manifested itself for two reasons:
1. ICEfaces 1.7 technically implements its own "portlet bridge" which wraps Liferay's RenderRequest object in the portlet lifecycle.
2. Liferay's renderRequest.getAttributeNames() is not truthful as to all the attributes that you can actually call renderRequest.getAttribute() for.
I will get this fixed in future versions of Liferay, but Liferay 4.3 is very mature now, and so in order to make this work in Liferay 4.3.1, 4.3.2, and 4.3.3 I would like to recommend that the ICEfaces PortletEnvironmentRenderRequest.java file be modified to correct the issue.
Here is my proposed additions for PortletEnvironmentRenderRequest() constructor:
// Additional Liferay attributes that are not returned by getAttributeNames()
String[] liferayAttributeNames = new String[] {"javax.portlet.config", "THEME_DISPLAY"};
for (int i = 0; i < liferayAttributeNames.length; i++) {
String attributeName = liferayAttributeNames[i];
Object attributeValue = this.request.getAttribute(attributeName);
if (attributeValue != null) {
attributes.put(attributeName, attributeValue);
}
}
1. ICEfaces 1.7 technically implements its own "portlet bridge" which wraps Liferay's RenderRequest object in the portlet lifecycle.
2. Liferay's renderRequest.getAttributeNames() is not truthful as to all the attributes that you can actually call renderRequest.getAttribute() for.
I will get this fixed in future versions of Liferay, but Liferay 4.3 is very mature now, and so in order to make this work in Liferay 4.3.1, 4.3.2, and 4.3.3 I would like to recommend that the ICEfaces PortletEnvironmentRenderRequest.java file be modified to correct the issue.
Here is my proposed additions for PortletEnvironmentRenderRequest() constructor:
// Additional Liferay attributes that are not returned by getAttributeNames()
String[] liferayAttributeNames = new String[] {"javax.portlet.config", "THEME_DISPLAY"};
for (int i = 0; i < liferayAttributeNames.length; i++) {
String attributeName = liferayAttributeNames[i];
Object attributeValue = this.request.getAttribute(attributeName);
if (attributeValue != null) {
attributes.put(attributeName, attributeValue);
}
}
This was fixed as part of
ICE-2247. Resolving as duplicate.