ICEfaces
  1. ICEfaces
  2. ICE-8848

ResourceOrdering causes problems with MyFaces

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.2.0.BETA
    • Fix Version/s: EE-3.2.0.GA
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      MyFaces
    • Assignee Priority:
      P1

      Description

      When trying to run the showcase application with MyFaces instead of Mojarra, I ran into a problem where numerous JavaScript exceptions were thrown by the client. It seems to be related to ResourceOrdering.

      It looks like all the requisite files are being loaded so I thought it might be a question of the order. When I put some debugging in the ResourceOrdering class I saw that the ordered resources were being processed the same way:

      MyFaces

      ResourceOrdering.orderResources: head facet is called head
      ResourceOrdering.orderResources: resource container org.apache.myfaces.component.ComponentResourceContainer@22c9af86
      ResourceOrdering.orderResources: added themes/sam/theme.css as a defined resource
      ResourceOrdering.orderResources: added jsf.js as a defined resource
      ResourceOrdering.orderResources: added util/ace-yui.js as a defined resource
      ResourceOrdering.orderResources: added util/combined.css as a defined resource
      ResourceOrdering.orderResources: added util/ace-jquery.js as a defined resource
      etc...

      Mojarra

      ResourceOrdering.orderResources: head facet is called javax_faces_location_HEAD
      ResourceOrdering.orderResources: resource container com.sun.faces.component.ComponentResourceContainer@5bbe1466
      ResourceOrdering.orderResources: added themes/sam/theme.css as a defined resource
      ResourceOrdering.orderResources: added jsf.js as a defined resource
      ResourceOrdering.orderResources: added util/ace-yui.js as a defined resource
      ResourceOrdering.orderResources: added util/combined.css as a defined resource
      ResourceOrdering.orderResources: added util/ace-jquery.js as a defined resource
      etc…

      But when I looked at the final rendered output, the Mojarra markup matches the order we added the resources but the MyFaces code does not - it's in some other unpredictable order. So it seems that the ResourceOrdering strategy is not working the same way with MyFaces. - that is, the underlying collection/list/set/map is not honouring the order that we're adding the resources back in (or something to that effect).

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32988 Tue Jan 08 11:42:11 MST 2013 mircea.toma ICE-8848 Modified ace and compat GMapResourceHandler.ResourceEntry implmentation to return corresponding resource and library name when Resource.getResourceName or Resource.getLibraryName methods are invoked.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/gmap/GMapResourceHandler.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32986 Tue Jan 08 11:17:03 MST 2013 mircea.toma ICE-8848 Fix library name for icefaces-compat.uncompressed.js resource. Modified ResourceOrdering.orderResources method to make sure that the resource components that do not have resource dependency data to first remove them from the view root and then added last after the ordered resource components were put in. Modified BridgeSetup and ExtrasSetup to provide "name" and "library" attributes to the components responsible for renedering the bridge and compat setup code. Also defined dependnecy data for the setup code.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/resources/META-INF/resource-dependency.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/application/ExtrasSetup.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/ResourceOrdering.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32965 Sun Jan 06 11:37:01 MST 2013 mircea.toma ICE-8848 Revert last commit, committed by mistake.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/datetimeentry/datetimeentry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32963 Fri Jan 04 16:03:28 MST 2013 mircea.toma ICE-8848 Updated the resource library names for the ICEfaces core, compat and ICEpush resources in the resource-dependency.xml metadata. The library names were changed during ICE-8666 refactoring.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/resources/META-INF/resource-dependency.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/META-INCLUDE/resource-dependency.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/resources/META-INF/resource-dependency.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/datetimeentry/datetimeentry.js

          People

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

            Dates

            • Created:
              Updated:
              Resolved: