ICEfaces
  1. ICEfaces
  2. ICE-7789

Load ACE theme resources by means of a custom h:head renderer

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: EE-3.0.0.BETA, 3.0.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      Loading theme resources without a Head renderer has caused other problems at the core level. Furthermore, the original reason for avoiding the use of a Head renderer was to avoid conflicts with other JSF libraries also using a Head renderer, but this wasn't done as part of a thorough, orchestrated plan to avoid conflicts at all levels. For example, nothing has been planned to avoid CSS conflicts with other libraries using different versions of jQuery UI that might have different stylings and affect all widgets on the page with the same class names. Therefore, at the moment, there is no real benefit in not using a Head renderer, and many problems could be avoided by simply using it right now.

        Issue Links

          Activity

          Arturo Zambrano created issue -
          Arturo Zambrano made changes -
          Field Original Value New Value
          Assignee Arturo Zambrano [ artzambrano ]
          Arturo Zambrano made changes -
          Salesforce Case []
          Description Loading theme resources without a Head renderer has caused other problems at the core level. Furthermore, the original reason for avoiding the use of a Head renderer was to avoid conflicts with other JSF libraries also using a Head renderer, but this wasn't done as part of a thorough plan to avoid conflicts. For example, nothing has been planned to avoid CSS conflicts with other libraries using different versions of jQuery UI that might have different stylings and affect all widgets on the page using the same class names. Therefore, at the moment, there is no real benefit in not using a Head renderer, and many problems could be avoided by simply using it right now. Loading theme resources without a Head renderer has caused other problems at the core level. Furthermore, the original reason for avoiding the use of a Head renderer was to avoid conflicts with other JSF libraries also using a Head renderer, but this wasn't done as part of a thorough, orchestrated plan to avoid conflicts at all levels. For example, nothing has been planned to avoid CSS conflicts with other libraries using different versions of jQuery UI that might have different stylings and affect all widgets on the page with the same class names. Therefore, at the moment, there is no real benefit in not using a Head renderer, and many problems could be avoided by simply using it right now.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27947 Tue Feb 21 09:52:29 MST 2012 art.zambrano ICE-7789 re-enabled the use of a h:head renderer; removed the ThemeLoader component and the special resources feature
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/META-INCLUDE/faces-config.xml
          Commit graph DEL /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/themeloader
          Commit graph DEL /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/render/SpecialResourceComponent.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27949 Tue Feb 21 10:06:37 MST 2012 art.zambrano ICE-7789 re-enabled the use of a h:head renderer; removed the ThemeLoader component and the special resources feature
          Files Changed
          Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/ace/component/resources/icefaces.ace/META-INCLUDE/faces-config.xml
          Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Commit graph DEL /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/render/SpecialResourceComponent.java
          Commit graph DEL /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/ace/component/src/org/icefaces/ace/component/themeloader
          Ken Fyten made changes -
          Summary Load ACE theme resources by means of a Head renderer Load ACE theme resources by means of a custom Head renderer
          Salesforce Case []
          Ken Fyten made changes -
          Summary Load ACE theme resources by means of a custom Head renderer Load ACE theme resources by means of a custom h:head renderer
          Salesforce Case []
          Affects [Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s EE-3.0.0.BETA [ 10324 ]
          Fix Version/s 3.0.1 [ 10282 ]
          Assignee Priority P1
          Ken Fyten made changes -
          Link This issue blocks ICE-7761 [ ICE-7761 ]
          Hide
          Arturo Zambrano added a comment -

          Fixed at revision 27947 in the trunk and at revision 27949 in the maintenance branch.

          Show
          Arturo Zambrano added a comment - Fixed at revision 27947 in the trunk and at revision 27949 in the maintenance branch.
          Arturo Zambrano made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Arturo Zambrano made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Arturo Zambrano added a comment -

          This issue was re-opened to make the use of the custom h:head renderer customizable via a context parameter.

          Show
          Arturo Zambrano added a comment - This issue was re-opened to make the use of the custom h:head renderer customizable via a context parameter.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27997 Thu Feb 23 10:00:45 MST 2012 art.zambrano ICE-7789 added configuration parameter to specify which h:head renderer to use
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27998 Thu Feb 23 10:02:55 MST 2012 art.zambrano ICE-7789 added configuration parameter to specify which h:head renderer to use
          Files Changed
          Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Hide
          Arturo Zambrano added a comment -

          Added "org.icefaces.HEAD_RENDERER" context parameter to specify which h:head renderer class to use.

          Show
          Arturo Zambrano added a comment - Added "org.icefaces.HEAD_RENDERER" context parameter to specify which h:head renderer class to use.
          Arturo Zambrano made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28006 Thu Feb 23 12:48:09 MST 2012 art.zambrano ICE-7789 made DOMRenderKit check the org.icefaces.ace.theme param in order to load the ACE h:head renderer or not
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/renderkit/HeadRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #28007 Thu Feb 23 12:53:10 MST 2012 art.zambrano ICE-7789 made DOMRenderKit check the org.icefaces.ace.theme param in order to load the ACE h:head renderer or not
          Files Changed
          Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Commit graph MODIFY /icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/ace/component/src/org/icefaces/ace/renderkit/HeadRenderer.java
          Hide
          Arturo Zambrano added a comment -

          Removed "org.icefaces.HEAD_RENDERER" context parameter and instead of that the the already-existing "org.icefaces.ace.theme" parameter will be checked to see if its value is "none". If it is, the ACE h:head renderer won't be added to the renderkit, and thus, it won't be used to render h:head, leaving such responsibility to whatever other h:head renderer is added last (be it from a third-party JSF library or simply the default renderer from the JSF runtime in use, mojarra or myfaces).

          Show
          Arturo Zambrano added a comment - Removed "org.icefaces.HEAD_RENDERER" context parameter and instead of that the the already-existing "org.icefaces.ace.theme" parameter will be checked to see if its value is "none". If it is, the ACE h:head renderer won't be added to the renderkit, and thus, it won't be used to render h:head, leaving such responsibility to whatever other h:head renderer is added last (be it from a third-party JSF library or simply the default renderer from the JSF runtime in use, mojarra or myfaces).
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1
          Hide
          Mark Earlam added a comment -

          Unless I am missing something the rime.css is meant to come before our custom stylesheets now but even in your sample application (3.0.1) it renders:

          <?xml version="1.0"?>
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml"><head>
          <link href="/showcase/javax.faces.resource/themes/sam/theme.css.jsf?ln=icefaces.ace" rel="stylesheet" type="text/css" />
          <link href="/showcase/javax.faces.resource/demo_template.css.jsf?ln=css" rel="stylesheet" type="text/css" />
          <link href="/showcase/javax.faces.resource/override_styles.css.jsf?ln=css" rel="stylesheet" type="text/css" />
          <link href="/showcase/javax.faces.resource/showcase_styles.css.jsf?ln=css" rel="stylesheet" type="text/css" />
          <link href="/showcase/javax.faces.resource/util/combined.css.jsf?ln=icefaces.ace" rel="stylesheet" type="text/css" />
          <script src="/showcase/javax.faces.resource/util/ace-jquery.js.jsf?ln=icefaces.ace" type="text/javascript"></script>
          <script src="/showcase/javax.faces.resource/util/ace-components.js.jsf?ln=icefaces.ace" type="text/javascript"></script>
          <script src="/showcase/javax.faces.resource/util/ace-menu.js.jsf?ln=icefaces.ace" type="text/javascript"></script>
          <script src="/showcase/javax.faces.resource/util/ace-yui.js.jsf?ln=icefaces.ace" type="text/javascript"></script>
          <script src="/showcase/javax.faces.resource/jsf.js.jsf?ln=javax.faces&amp;v=1002437518" type="text/javascript"></script>
          <script src="/showcase/javax.faces.resource/icepush.js.jsf?v=1002437518" type="text/javascript"></script>
          <script src="/showcase/javax.faces.resource/bridge.js.jsf?v=1002437518" type="text/javascript"></script>
          <script src="/showcase/javax.faces.resource/compat.js.jsf" type="text/javascript"></script>
          <script src="/showcase/javax.faces.resource/icefaces-compat.js.jsf" type="text/javascript"></script>
                  <title id="title">ICEfaces Showcase</title>
                  <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /><link href="./xmlhttp/css/rime/rime.css" rel="stylesheet" type="text/css" /></head><body class="suite ice-skin-rime">
                      <div id="header">
                  <div id="headerCenter">
                      <div id="headerLogo"><img alt="ICEfaces Logo" src="/showcase/resources/css/images/topBannerImages/title.png" />
                      </div>
                      <div id="headerTabs"><table class="linkTableStyle" id="suiteLinks">
          <tbody>
          <tr>
          <td><span class="linksHolder" id="_t16"><a href="/showcase/showcase.jsf?grp=compatMenu" id="iceSuiteLink" name="iceSuiteLink"><img alt="ICE Components Showcase" class="suiteLinkImageStyle" src="/showcase/resources/css/images/topBannerImages/ice-on.png" title="ICE Components Showcase" /></a><a href="/showcase/showcase.jsf?grp=aceMenu" id="aceSuiteLink" name="aceSuiteLink"><img alt="ACE Components Showcase" class="suiteLinkImageStyle" src="/showcase/resources/css/images/topBannerImages/ace-off.png" title="ACE Components Showcase" /></a></span></td>
          </tr>
          </tbody>
          </table>
          

          The only way we can make this work is to use <ice:outputStyle> which is throwing errors on restoring state so is also useless.

          Is the above expected behaviour and if so how do I get my custom stylesheets below rime.css so they override the styles?

          Show
          Mark Earlam added a comment - Unless I am missing something the rime.css is meant to come before our custom stylesheets now but even in your sample application (3.0.1) it renders: <?xml version= "1.0" ?> <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > <html xmlns= "http: //www.w3.org/1999/xhtml" ><head> <link href= "/showcase/javax.faces.resource/themes/sam/theme.css.jsf?ln=icefaces.ace" rel= "stylesheet" type= "text/css" /> <link href= "/showcase/javax.faces.resource/demo_template.css.jsf?ln=css" rel= "stylesheet" type= "text/css" /> <link href= "/showcase/javax.faces.resource/override_styles.css.jsf?ln=css" rel= "stylesheet" type= "text/css" /> <link href= "/showcase/javax.faces.resource/showcase_styles.css.jsf?ln=css" rel= "stylesheet" type= "text/css" /> <link href= "/showcase/javax.faces.resource/util/combined.css.jsf?ln=icefaces.ace" rel= "stylesheet" type= "text/css" /> <script src= "/showcase/javax.faces.resource/util/ace-jquery.js.jsf?ln=icefaces.ace" type= "text/javascript" ></script> <script src= "/showcase/javax.faces.resource/util/ace-components.js.jsf?ln=icefaces.ace" type= "text/javascript" ></script> <script src= "/showcase/javax.faces.resource/util/ace-menu.js.jsf?ln=icefaces.ace" type= "text/javascript" ></script> <script src= "/showcase/javax.faces.resource/util/ace-yui.js.jsf?ln=icefaces.ace" type= "text/javascript" ></script> <script src= "/showcase/javax.faces.resource/jsf.js.jsf?ln=javax.faces&amp;v=1002437518" type= "text/javascript" ></script> <script src= "/showcase/javax.faces.resource/icepush.js.jsf?v=1002437518" type= "text/javascript" ></script> <script src= "/showcase/javax.faces.resource/bridge.js.jsf?v=1002437518" type= "text/javascript" ></script> <script src= "/showcase/javax.faces.resource/compat.js.jsf" type= "text/javascript" ></script> <script src= "/showcase/javax.faces.resource/icefaces-compat.js.jsf" type= "text/javascript" ></script> <title id= "title" >ICEfaces Showcase</title> <meta content= "text/html; charset=utf-8" http-equiv= "Content-Type" /><link href= "./xmlhttp/css/rime/rime.css" rel= "stylesheet" type= "text/css" /></head><body class= "suite ice-skin-rime" > <div id= "header" > <div id= "headerCenter" > <div id= "headerLogo" ><img alt= "ICEfaces Logo" src= "/showcase/resources/css/images/topBannerImages/title.png" /> </div> <div id= "headerTabs" ><table class= "linkTableStyle" id= "suiteLinks" > <tbody> <tr> <td><span class= "linksHolder" id= "_t16" ><a href= "/showcase/showcase.jsf?grp=compatMenu" id= "iceSuiteLink" name= "iceSuiteLink" ><img alt= "ICE Components Showcase" class= "suiteLinkImageStyle" src= "/showcase/resources/css/images/topBannerImages/ice-on.png" title= "ICE Components Showcase" /></a><a href= "/showcase/showcase.jsf?grp=aceMenu" id= "aceSuiteLink" name= "aceSuiteLink" ><img alt= "ACE Components Showcase" class= "suiteLinkImageStyle" src= "/showcase/resources/css/images/topBannerImages/ace-off.png" title= "ACE Components Showcase" /></a></span></td> </tr> </tbody> </table> The only way we can make this work is to use <ice:outputStyle> which is throwing errors on restoring state so is also useless. Is the above expected behaviour and if so how do I get my custom stylesheets below rime.css so they override the styles?
          Hide
          Arturo Zambrano added a comment -

          Try placing your style sheets (using h:outputStylesheet) in the body tag, instead of in h:head.

          Show
          Arturo Zambrano added a comment - Try placing your style sheets (using h:outputStylesheet) in the body tag, instead of in h:head.

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Arturo Zambrano
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: