ICEfaces
  1. ICEfaces
  2. ICE-2311

<ice:inputRichText /> not rendering in a Liferay Facelets portlet

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7DR#2
    • Fix Version/s: 1.7Beta1, 1.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows / Liferay 4.3.3 / Tomcat 6.0.13

      Description

      When I try to put an <ice:inputRichText /> component in a Liferay Facelets portlet, Firefox reports a JavaScript error on this rendered line in the HTML page:

      <script type="text/javascript">Ice.FCKeditor.register ('_id2:_id4', new Ice.FCKeditor('_id2:_id4', '','da', '', '/icetest-portlet/block/resource/LTQ5MTYyMDg1Mw==/','100%', '200'));</script>

      The error is "Ice.FCKeditor has no properties"

      I've attached a sample portlet that will enable you to reproduce the error. To install, simply copy the attached file to your Liferay "Hot Deploy" folder, and then startup Liferay 4.3.3. The portlet can be found under the "Add Content" menu in the "Sample" category. It is named "ICEfaces Test"

        Issue Links

          Activity

          Hide
          Neil Griffin added a comment -

          Adnan,

          Although a portlet is packaged like any other webapp, the portal will prevent you from trying to run it directly from a URL like that. Instead, visit http://localhost:8080 and login to the portal first. The username is test@liferay.com and the password is test. Then, click the "Add Page" button to add a new portal page. Then, under the "Welcome Joe Bloggs" menu, click on "Add Content". You can add the portlet to your portal page by clicking the "Add" button next to it. You'll find it it under the the "Sample" category. It is named "ICEfaces Test".

          Neil

          Show
          Neil Griffin added a comment - Adnan, Although a portlet is packaged like any other webapp, the portal will prevent you from trying to run it directly from a URL like that. Instead, visit http://localhost:8080 and login to the portal first. The username is test@liferay.com and the password is test. Then, click the "Add Page" button to add a new portal page. Then, under the "Welcome Joe Bloggs" menu, click on "Add Content". You can add the portlet to your portal page by clicking the "Add" button next to it. You'll find it it under the the "Sample" category. It is named "ICEfaces Test". Neil
          Hide
          Neil Griffin added a comment -

          As of trunk revision 15355 on 12/12/2007 I'm now seeing a new error. When I have an <ice:inputRichText /> on the .xhtml page, I get the message "URI CREATED JUST ONE" in the console and the Facelet doesn't render at all.

          Show
          Neil Griffin added a comment - As of trunk revision 15355 on 12/12/2007 I'm now seeing a new error. When I have an <ice:inputRichText /> on the .xhtml page, I get the message "URI CREATED JUST ONE" in the console and the Facelet doesn't render at all.
          Hide
          Deryk Sinotte added a comment -

          I've just had an initial look at this. It appears that the InputRichText component registers the FCKEditor JavaScript files that need to be served up with BridgeFacesContext using the loadJavascriptCode() methods. These methods add the locations of the resources to be served when the component is rendered. However, these resources are actually written into the page in the DOMResponseWriter.enhanceHead() method which does not look like it gets executed in a portlet environment. It's likely we need a different mechanism so that the script resources are written into the portlet content directly.

          Show
          Deryk Sinotte added a comment - I've just had an initial look at this. It appears that the InputRichText component registers the FCKEditor JavaScript files that need to be served up with BridgeFacesContext using the loadJavascriptCode() methods. These methods add the locations of the resources to be served when the component is rendered. However, these resources are actually written into the page in the DOMResponseWriter.enhanceHead() method which does not look like it gets executed in a portlet environment. It's likely we need a different mechanism so that the script resources are written into the portlet content directly.
          Hide
          Deryk Sinotte added a comment -

          The problem with this is more general and affects any component that depends on injecting 3rd party JavaScript while running in a portlet environment.

          Show
          Deryk Sinotte added a comment - The problem with this is more general and affects any component that depends on injecting 3rd party JavaScript while running in a portlet environment.
          Hide
          Deryk Sinotte added a comment -

          The common issue of injecting component-specific JavaScript has been fixed. The Rich Text Editor now works in a portlet environment. Resolving as fixed.

          Show
          Deryk Sinotte added a comment - The common issue of injecting component-specific JavaScript has been fixed. The Rich Text Editor now works in a portlet environment. Resolving as fixed.

            People

            • Assignee:
              Unassigned
              Reporter:
              Neil Griffin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: