ICEfaces
  1. ICEfaces
  2. ICE-9686

Application defined resources (CSS, JavaScript) are loaded first in the head tag

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: EE-3.3.0.GA_P01
    • Fix Version/s: 4.0.BETA, EE-3.3.0.GA_P02, 4.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description

      When defining application specific CSS and JavaScript files in the h:head tag, these resources are rendered first and then the ICEfaces CSS/Script is loaded after. In the EE 3.2.0 release these resources were loaded last, therefore allowing style/script to override the default ICEfaces resources if required.

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case war and source code that reproduced this issue. Note: the icefaces.jar, icefaces-ace.jar, and icefaces-compat.jar need to be added back into the war for it to run.

        Also attached two screen shots showing the differences between EE 3.2.0 and EE 3.3.0 P01.

        Show
        Arran Mccullough added a comment - Attached test case war and source code that reproduced this issue. Note: the icefaces.jar, icefaces-ace.jar, and icefaces-compat.jar need to be added back into the war for it to run. Also attached two screen shots showing the differences between EE 3.2.0 and EE 3.3.0 P01.
        Hide
        Mircea Toma added a comment -

        The problem does not reside in ICEfaces but in application code. The welcome page needs to h:outputScript and h:outputStylesheet component to define the extra resources that the application needs. This way it is ensured that resources are taken into account by JSF and later on by our resource ordering feature.

        The fix applied to welcomeICEfaces.xhtml should look like this:

        .....
            <h:head>
                <title>ICEfaces 3</title>
                <h:outputStylesheet name="style.css" library="css" target="head"/>
                <h:outputScript name="script.js" library="js" target="head"/>
            </h:head>
        .....
        
        Show
        Mircea Toma added a comment - The problem does not reside in ICEfaces but in application code. The welcome page needs to h:outputScript and h:outputStylesheet component to define the extra resources that the application needs. This way it is ensured that resources are taken into account by JSF and later on by our resource ordering feature. The fix applied to welcomeICEfaces.xhtml should look like this: ..... <h:head> <title>ICEfaces 3</title> <h:outputStylesheet name= "style.css" library= "css" target= "head" /> <h:outputScript name= "script.js" library= "js" target= "head" /> </h:head> .....

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: