ICEfaces
  1. ICEfaces
  2. ICE-8163

Application specific CSS classes are loaded before ICEfaces CSS when you disable automatic theme loading

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Glassfish 3.1, Tomcat 7, Chrome, Firefox, Internet Explorer 9
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      A formal fix for this issue depends on a new resource ordering capability in either JSF itself, or possibly ICEfaces. In the meantime, there are two possible workarounds for this issue:

      1. Move the application-level CSS stylesheets into the top of the body region of the page, and out of the head. This will ensure that they are always loaded after the core icefaces stylesheets.

      2. Possibly you could create a custom ThemeRoller theme with essentially empty style sheets and specify that using the org.icefaces.ace.theme config. param.

      Show
      A formal fix for this issue depends on a new resource ordering capability in either JSF itself, or possibly ICEfaces. In the meantime, there are two possible workarounds for this issue: 1. Move the application-level CSS stylesheets into the top of the body region of the page, and out of the head. This will ensure that they are always loaded after the core icefaces stylesheets. 2. Possibly you could create a custom ThemeRoller theme with essentially empty style sheets and specify that using the org.icefaces.ace.theme config. param.

      Description

      Based on http://wiki.icesoft.org/display/ICE/ace.theme you need to set the following parameter to none in order to disable automatic theme loading:

      <context-param>
      <param-name>org.icefaces.ace.theme</param-name>
      <param-value>none</param-value>
      </context-param>

      When you do this, custom application style sheets are loaded first.

      If you remove this parameter custom CSS will appear at the end of the header as specified in release notes:
      http://wiki.icesoft.org/display/ICE/ICEfaces+3.0.1+Release+Notes


      See screen shots for details.
      To reproduce use attached source code.
      1. theme-none-absent.jpg
        147 kB
      2. theme-none-present.jpg
        131 kB

        Issue Links

          Activity

          Hide
          Evgheni Sadovoi added a comment -

          This JIRA is related to the changes we introduced in ICE-7761

          Show
          Evgheni Sadovoi added a comment - This JIRA is related to the changes we introduced in ICE-7761
          Hide
          Mircea Toma added a comment -

          Chances are that ICE-8171 resolution will fix this issue as well.

          Show
          Mircea Toma added a comment - Chances are that ICE-8171 resolution will fix this issue as well.
          Hide
          Mircea Toma added a comment - - edited

          Modified HeadRenderer to add theme related CSS resources to the component tree before render phase (modeled after h:outputStylesheet renderer). This way the resource ordering can be properly applied to all the resources that need to be rendered in the page. Added resource dependency metadata for the themes to make sure they get loaded after the component related CSS styles.

          Show
          Mircea Toma added a comment - - edited Modified HeadRenderer to add theme related CSS resources to the component tree before render phase (modeled after h:outputStylesheet renderer). This way the resource ordering can be properly applied to all the resources that need to be rendered in the page. Added resource dependency metadata for the themes to make sure they get loaded after the component related CSS styles.
          Hide
          Mircea Toma added a comment -

          Modified attached test case to use h:outputStylesheet tag instead of the HTML 'link' tag, this way the resource is added to the head. Later on the resource is ordered based on the resource dependency metadata saved in WEB-INF/classes/META-INF/resource-dependency.xml file.

          Show
          Mircea Toma added a comment - Modified attached test case to use h:outputStylesheet tag instead of the HTML 'link' tag, this way the resource is added to the head. Later on the resource is ordered based on the resource dependency metadata saved in WEB-INF/classes/META-INF/resource-dependency.xml file.

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Evgheni Sadovoi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: