ICEfaces
  1. ICEfaces
  2. ICE-6282

Order of portlet loading/rendering affects component behaviour

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2-EE-GA_P01
    • Fix Version/s: 1.8.2-EE-GA_P02
    • Labels:
      None
    • Environment:
      ICEfaces 1 portal portlet Liferay 5 and 6

      Description

      Certain component showcase examples don't function as designed if they are not loaded/rendered in a certain order. Specifically, a certain subset of components appear to only function correctly if they are loaded/rendered last on a portal page. This includes the case if they are the only portlet on the page. If they are on a page with other portlets and they are not the the last one rendered, they exhibit the following issues:

      - Auto Complete: the autocomplete menu does not drop down
      - Drag N Drop: the first drag/drop operation doesn't function properly
      - Panel Positioned: will not allow any drag/drop operation (or the first one may work but further attempts will not)
      - Rich Text: has a number of different symptoms which all seem to be related to this error (from FireBug)

      [window.twbO#8] failed to insert element: <script id="twbOVQVPOy0I223ga8UZ1Q:8:dynamic-code" type="text/javascript">...</script> TypeError: Ice.FCKeditorUtility is undefined { message="Ice.FCKeditorUtility is undefined", more...}

      If the Rich Text component is not the last one rendered, the above problem will manifest itself and lead to other problems (like not being able to change toolbar modes and not saving properly).

        Activity

        Deryk Sinotte created issue -
        Deryk Sinotte made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 1.8.2-EE-GA_P02 [ 10226 ]
        Assignee Priority P1
        Assignee Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23184 Mon Nov 22 18:10:04 MST 2010 mircea.toma ICE-6282 Evaluate ICEfaces' JS code only once even if referenced multiple times.
        Files Changed
        Commit graph ADD /icefaces/trunk/icefaces/bridge/src/footer.js
        Commit graph ADD /icefaces/trunk/icefaces/bridge/src/header.js
        Commit graph ADD /icefaces/trunk/icefaces/bridge/lib/extras/header.js
        Commit graph ADD /icefaces/trunk/icefaces/bridge/lib/extras/footer.js
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/namespace.js
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/build.xml
        Hide
        Mircea Toma added a comment -

        The issues seen with the listed components are due to the repeated loading and evaluating of the same JS files. Every time that the referenced JS code is evaluated it will create new global variables thus overwriting the previously declared ones, variables that had their state changed in the mean time.
        Introduced tests in icefaces-d2d.js and ice-extras.js to avoid having the code evaluated multiple times.

        Show
        Mircea Toma added a comment - The issues seen with the listed components are due to the repeated loading and evaluating of the same JS files. Every time that the referenced JS code is evaluated it will create new global variables thus overwriting the previously declared ones, variables that had their state changed in the mean time. Introduced tests in icefaces-d2d.js and ice-extras.js to avoid having the code evaluated multiple times.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23186 Tue Nov 23 10:47:56 MST 2010 mircea.toma ICE-6282 Fix JS compression.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/footer.js
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/src/header.js
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/header.js
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/footer.js
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/build.xml
        Hide
        Deryk Sinotte added a comment -

        Looks like the fix helped with most of the outstanding behaviours. I ran through all the portlets in Liferay 5 with FF and IE (and a few sample portlets with Safari and Chrome). The big issue I see now is only with IE. In IE, the Auto Select throws all kinds of JS errors (and pops up the offer to debug) AFTER you start typing and the menu drops down. Turn off the debugging and it still doesn't work properly. Other browsers appear to work fine.

        Just to note, the functionality is good in IE if the Auto Select is the only portlet on the page. However, if there any other portlets present (the order doesn't matter) then the problem manifests.

        Show
        Deryk Sinotte added a comment - Looks like the fix helped with most of the outstanding behaviours. I ran through all the portlets in Liferay 5 with FF and IE (and a few sample portlets with Safari and Chrome). The big issue I see now is only with IE. In IE, the Auto Select throws all kinds of JS errors (and pops up the offer to debug) AFTER you start typing and the menu drops down. Turn off the debugging and it still doesn't work properly. Other browsers appear to work fine. Just to note, the functionality is good in IE if the Auto Select is the only portlet on the page. However, if there any other portlets present (the order doesn't matter) then the problem manifests.
        Deryk Sinotte made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23189 Tue Nov 23 17:10:15 MST 2010 mircea.toma ICE-6282 Evaluate Prototype files used by ice-extras.js only once to avoid IE confusion when deciding strategy to be use for extending DOM element functionality.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/build.xml
        Hide
        Mircea Toma added a comment -

        Evaluate Prototype files (dom.js in particular) used by ice-extras.js only once to avoid IE confusion when deciding strategy to be use for extending DOM element functionality. Issue originally solved for ICE-6039.

        Show
        Mircea Toma added a comment - Evaluate Prototype files (dom.js in particular) used by ice-extras.js only once to avoid IE confusion when deciding strategy to be use for extending DOM element functionality. Issue originally solved for ICE-6039 .
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Summary Order of portlet loading/rendering affects behaviour Order of portlet loading/rendering affects component behaviour
        Salesforce Case []
        Ken Fyten made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Salesforce Case []
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: