-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: liferay-faces-3.0.0-legacy-ga1, liferay-faces-3.1.0-ga1
-
Component/s: Liferay Faces Portal / Demos / Tests
-
Labels:None
The liferay-ui:input-editor is a Facelet composite component, but references a Java-based liferay-ui-internal:input-editor UIComponent. The InputEditorInternalRenderer.java class invokes a RequestDispatcher in order to capture the output of the out-of-the-box liferay-ui:input-editor JSP tag.
During the RENDER_PHASE of the portlet lifecycle, the liferay-ui:input-editor JSP tag renders markup that looks like this:
<div class=""> <textarea id="_myportlet_WAR_myportlet_A2464:f1:comments1" name="_myportlet_WAR_myportlet_A2464:f1:comments1" style="display: none;"></textarea> </div>
Additionally, it appends <script>...</script> elements to the value of the "LIFERAY_SHARED_AUI_SCRIPT_DATA" request attribute so that they will appear at the bottom of the rendered portal page.
But during the RESOURCE_PHASE of the portlet lifecycle (triggered by f:ajax), the liferay-ui:input-editor JSP tag renders markup that INCLUDES the aforementioned <script>...</script> elements. The reason for this, is because the "LIFERAY_SHARED_AUI_SCRIPT_DATA" approach cannot be used during Ajax.
The problem is that this additional markup causes ICEfaces to detect a DOM diff, and which causes the CKEditor(s) to be unnecessarily replaced in the DOM of the browser. The fix would be to have the InputEditorInternalRenderer.java class remove the additional markup during the RESOURCE_PHASE for any component instances that do not need to be re-initialized.
An additional fix is that any <script>...</script> elements must be moved out of the response markup to the ICEfaces JavaScriptRunner so that it does not become a factor with the ICEfaces DOM-diff algorithm.
- is related to
-
FACES-1439 liferay-ui:input-editor does not work in show/hide use case scenarios
-
- Closed
-
-
FACES-1444 Implement feature that allows components that have gone from rendered="false" to rendered="true" to render scripts that cleanup the DOM
-
- Closed
-
-
FACES-1440 Support f:ajax "change" ClientBehavior for liferay-ui:input-editor
-
- Closed
-
-
FACES-1441 Support f:ajax "blur" ClientBehavior for liferay-ui:input-editor
-
- Closed
-
-
FACES-1443 Move RendererWrapper from liferay-faces-bridge-impl to liferay-faces-util
-
- Closed
-