Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-1713

liferay-ui:input-editor does not store aui:script text in WebKeys.AUI_SCRIPT_DATA request attribute during ajax requests on versions of Liferay Portal prior to 6.1.2/6.1.30

    Details

      Description

      In versions of Liferay Portal prior to 6.1.2-ce-ga3/6.1.30-ee-ga3, the com.liferay.taglib.util.PositionTagSupport class determined the position attribute of aui:script tags dynamically with the following code block:

      if (themeDisplay.isIsolated() ||
      	themeDisplay.isLifecycleResource() ||
      	themeDisplay.isStateExclusive()) {
      
      	position = _POSITION_INLINE;
      }
      else {
      	position = _POSITION_AUTO;
      }
      

      Calling themeDisplay.isLifecycleResource() returns true during Ajax requests causes the position attribute of aui:script tags to automatically become "inline". Inline scripts are written directly to the response, rather than stored in the WebKeys.AUI_SCRIPT_DATA request attribute.

      But after LPS-31496 and LPS-35322 were fixed in 6.1.2/6.1.30/6.2.x, the code was changed so that themeDisplay.isLifecycleResource() is no longer consulted:

      if (themeDisplay.isStateExclusive() || themeDisplay.isIsolated()) {
      	position = _POSITION_INLINE;
      }
      else {
      	position = _POSITION_AUTO;
      }
      

      The result is that the position attribute of aui:script tags no longer automatically become "inline" during Ajax. This is the expectation of the current design of the JSF version of the liferay-ui:input-editor component.

      In order to fix this problem the InputEditorInternalRenderer needs to call themeDisplay.setLifecycleResource(false) prior to executing the request dispatcher for ckeditor.jsp. After the request dispatcher has finished, it needs to restore the value.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              neil.griffin Neil Griffin
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  liferay-faces-3.0.3-legacy-ga4
                  liferay-faces-3.0.3-ga4
                  liferay-faces-3.1.3-ga4