p_p_auth URL parameter causing DOM diff inefficiency with ICEfaces

Description

While doing some testing with the liferay-ui:input-editor, I found that the p_p_auth URL parameter was being added to ActionURLs and PartialActionURLs during Ajax requests. This is causing DOM-diff inefficiencies with ICEfaces. In the case of the liferay-ui:input-editor, the entire form ends up getting replaced in the browser because the form's "action" attribute contains a slightly different URL.

It turns out that during the RENDER_PHASE of the portlet lifecycle, the Liferay PortletImpl.renderPortlet(...) method adds the "RENDER_PORTLET" request attribute, which is consulted by the PortletURLImpl.addPortletAuthToken(...) method when URLs are being constructed. But during the RESOURCE_PHASE, Liferay does not add the "RENDER_PORTLET" attribute, and the PortletURLImpl.addPortletAuthToken(...) method behaves differently and ultimately causes the URL to have an additional "p_p_auth" parameter. Since the URL is different, it will cause ICEfaces to detect a DOM-diff, and will unnecessarily replace markup in the DOM.

UPDATE: August 19, 2013

The following line has a strikethrough to point out that it was an incorrect fix for this problem. The correct fix appears in FACES-1633.
The solution is to have the bridge add the attribute before the RENDER_RESPONSE phase of the JSF lifecycle executes, and then remove it after it executes.

Environment

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Affects versions

Priority

Zendesk Support

Created September 27, 2012 at 4:03 PM
Updated August 19, 2013 at 1:22 PM
Resolved August 19, 2013 at 1:22 PM