ICEfaces
  1. ICEfaces
  2. ICE-1671

Portlet decoration Javascript incompatibility between ICEfaces and Liferay "Desktop" theme

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.6DR#5
    • Fix Version/s: 1.6DR#6, 1.6
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Win XP / JDK 1.4 / Tomcat 5.5.17 / Liferay 4.3.0-RC1

      Description

      To reproduce:

      - Download Liferay 4.3.0-RC1 from here and install:
      http://www.liferay.com/web/guest/downloads/liferay_enterprise_portal/4_3_0rc1

      - Download the sample-icefaces-sun-portlet.war from here and drop it in $HOME/liferay/deploy (hot deploy folder):
      http://www.liferay.com/web/guest/downloads/samples

      - Start the portal

      - Start FireFox (as it has better error console reporting for JavaScript)

      - Using FireFox, visit http://localhost:8080 and login as test@liferay.com with password test

      - Add a new portal page named "ICEfaces"

      - Add the Sample ICEfaces (Sun RI) Portlet from the "Add Content" option

      - Click on "Page Settings" option

      - On the left hand side, click on the main/root "Joe Bloggs" tree node

      - On the right hand side, click on "Look and Feel"

      - Click on the "Desktop" theme

      Note that at this point, all portal pages should take on the portal theme

      - Note that on the "ICEfaces" page, when the mouse is positioned in the hard blue titlebar of the ICEfaces portlet, JavaScript errors are reported by the FireFox error console:

      "item.fn" is not a function in http://localhost:8080/html/js/liferay/animate.js

      Now, I understand that the error is occurring in a Liferay JavaScript file, and if y'all think that this is something that the Liferay folks should fix, then by all means say so.

      Thanks,

      Neil


        Activity

        Hide
        Ken Fyten added a comment -

        Please take a look.

        Show
        Ken Fyten added a comment - Please take a look.
        Hide
        Deryk Sinotte added a comment -

        I think we'll have to toss this one back to Liferay and they can discuss how best to deal with it.

        In the Liferay animate.js file, they have this little snippet of code in the process function:

        for (var i in this.q) {
        var item = this.q[i];
        if (item) {

        The problem is that q is based on the Object prototype and the ICEfaces library attaches a couple of generic utility functions to the Object. So that means that 'q' has more than just Object members, it also has Function members and when it iterates through, the conditional check passes when it shouldn't. I fixed it by doing this:

        for (var i in this.q) {
        var item = this.q[i];
        if (item && typeof item == 'object') {

        but that is probably not a robust, long-term solution. The code will probably need to be refined so that it is more selective about what it operates on as ICEfaces may not be the only library that does something like this.

        Show
        Deryk Sinotte added a comment - I think we'll have to toss this one back to Liferay and they can discuss how best to deal with it. In the Liferay animate.js file, they have this little snippet of code in the process function: for (var i in this.q) { var item = this.q [i] ; if (item) { The problem is that q is based on the Object prototype and the ICEfaces library attaches a couple of generic utility functions to the Object. So that means that 'q' has more than just Object members, it also has Function members and when it iterates through, the conditional check passes when it shouldn't. I fixed it by doing this: for (var i in this.q) { var item = this.q [i] ; if (item && typeof item == 'object') { but that is probably not a robust, long-term solution. The code will probably need to be refined so that it is more selective about what it operates on as ICEfaces may not be the only library that does something like this.
        Hide
        Deryk Sinotte added a comment -

        Marking as Won't Fix

        Show
        Deryk Sinotte added a comment - Marking as Won't Fix
        Hide
        Neil Griffin added a comment -

        Created bug on Liferay's JIRA system:

        http://support.liferay.com/browse/LEP-2974

        – Neil

        Show
        Neil Griffin added a comment - Created bug on Liferay's JIRA system: http://support.liferay.com/browse/LEP-2974 – Neil

          People

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

            Dates

            • Created:
              Updated:
              Resolved: