ICEfaces
  1. ICEfaces
  2. ICE-9163

Resource Ordering not maintained upon page navigation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      ICEfaces 3.x
    • Assignee Priority:
      P1

      Description

      The resource ordering is not maintained properly when page navigation occurs.

      To reproduce the issue, use the showcase sample. Monitor the HEAD section after each of the following steps:

      1. Load the showcase application (opens to the Overview landing page)
      1a. Resource ordering is correct (theme is first, etc.)
      2. Change the current theme to "swanky-purse" using the themeSelector.
      2a. Resource order is still correct (theme is now swanky-purse, but loaded first).
      3. Navigate to the Accordion demo by clicking on the link on the left side.
      3a. Resource ordering has been lost, theme is now loaded last, other ordering is not maintained either.


      1. 1stNavAfterThemeChange.png
        171 kB
      2. 1stnavAfterThemeChange-Coalesced.png
        75 kB
      3. 1stPgLoad.png
        163 kB
      4. 1stPgLoad-Coalesced.png
        78 kB
      5. Step1-HeadContents.png
        155 kB
      6. Step2-HeadContents.png
        154 kB
      7. Step3-HeadContents.png
        161 kB

        Issue Links

          Activity

          Ken Fyten created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Assignee Mircea Toma [ mircea.toma ]
          Assignee Priority P1 [ 10010 ]
          Hide
          Ken Fyten added a comment -

          Attached pics to illustrate the head section contents after each step.

          Show
          Ken Fyten added a comment - Attached pics to illustrate the head section contents after each step.
          Ken Fyten made changes -
          Attachment Step3-HeadContents.png [ 15801 ]
          Attachment Step2-HeadContents.png [ 15802 ]
          Attachment Step1-HeadContents.png [ 15803 ]
          Hide
          Mircea Toma added a comment -

          Added resource dependency data for the new theme selector resources.

          Show
          Mircea Toma added a comment - Added resource dependency data for the new theme selector resources.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #34372 Fri Apr 12 05:25:28 MDT 2013 mircea.toma ICE-9163 Added resource dependency data for the new theme selector resources.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/META-INCLUDE/resource-dependency.xml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #34382 Fri Apr 12 11:36:32 MDT 2013 ken.fyten ICE-9163 Added resource dependency data for the new theme selector resources.
          Files Changed
          Commit graph MODIFY /icefaces3/tags/icefaces-3.3.0/icefaces/ace/component/resources/icefaces.ace/META-INCLUDE/resource-dependency.xml
          Deryk Sinotte made changes -
          Assignee Mircea Toma [ mircea.toma ] Deryk Sinotte [ deryk.sinotte ]
          Deryk Sinotte made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Ken Fyten made changes -
          Comment [ Re-opening as it was mistakenly closed. ]
          Ken Fyten made changes -
          Comment [ Comment removed. Wrong case. ]
          Hide
          Ken Fyten added a comment -

          Re-opened as there is still an ordering issue when "org.icefaces.coalesceResources=true" mode is used.

          To reproduce the issue, use the showcase sample (from trunk rvn# 34387+). Monitor the HEAD section after each of the following steps:

          1. Load the showcase application (opens to the Overview landing page)
          1a. Resource ordering is correct (Sam theme comes before other CSS, incl. coalesced.css)
          2. Change the current theme to "Pepper-grinder" using the themeSelector.
          2a. Resource order is now incorrect. "Pepper-grinder theme is loaded AFTER the coalesced.css file.

          The theme MUST be loaded before the coalesced.css or any theme customizations in the coalesced.css file will be overridden by the theme being reloaded again after the coalesced.css has been applied.

          Show
          Ken Fyten added a comment - Re-opened as there is still an ordering issue when "org.icefaces.coalesceResources=true" mode is used. To reproduce the issue, use the showcase sample (from trunk rvn# 34387+). Monitor the HEAD section after each of the following steps: 1. Load the showcase application (opens to the Overview landing page) 1a. Resource ordering is correct (Sam theme comes before other CSS, incl. coalesced.css) 2. Change the current theme to "Pepper-grinder" using the themeSelector. 2a. Resource order is now incorrect. "Pepper-grinder theme is loaded AFTER the coalesced.css file. The theme MUST be loaded before the coalesced.css or any theme customizations in the coalesced.css file will be overridden by the theme being reloaded again after the coalesced.css has been applied.
          Ken Fyten made changes -
          Assignee Deryk Sinotte [ deryk.sinotte ] Mircea Toma [ mircea.toma ]
          Ken Fyten made changes -
          Fix Version/s 3.4 [ 10770 ]
          Fix Version/s 3.3 [ 10370 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #34415 Tue Apr 16 06:10:34 MDT 2013 mircea.toma ICE-9163 Modified ace:themeSelect component to use the resource related JSF API (to properly enable resource ordering and coalescing). Moved state from renderer to component.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/themeselect/ThemeSelect.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/showcase.xhtml
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/themeselect/ThemeSelectRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/themeselect/themeselect.js
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/renderkit/HeadRenderer.java
          Hide
          Mircea Toma added a comment -

          Modified ace:themeSelect component to use the resource related JSF API to properly enable resource ordering and coalescing. Now the component needs org.icefaces.generateHeadUpdate enabled to properly work since its basing the theme swiching on the update of the head trough ICEfaces core. Also moved state and utility methods from renderer to component.

          Show
          Mircea Toma added a comment - Modified ace:themeSelect component to use the resource related JSF API to properly enable resource ordering and coalescing. Now the component needs org.icefaces.generateHeadUpdate enabled to properly work since its basing the theme swiching on the update of the head trough ICEfaces core. Also moved state and utility methods from renderer to component.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #34416 Tue Apr 16 06:24:24 MDT 2013 mircea.toma ICE-9163 Remove static modifier for renderScript method.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/themeselect/ThemeSelectRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #34417 Tue Apr 16 06:43:35 MDT 2013 mircea.toma ICE-9163 Modified bridge to keep the list of current link refs up to date. This way CSS that was once interpreted will re-applied whenever is referenced again.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/fixjsf.js
          Hide
          Mircea Toma added a comment -

          Modified bridge to keep the list of current link refs up to date. This way CSS rules that were once interpreted will re-applied whenever the same resource will be referenced again.

          Show
          Mircea Toma added a comment - Modified bridge to keep the list of current link refs up to date. This way CSS rules that were once interpreted will re-applied whenever the same resource will be referenced again.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Link This issue depends on ICE-8793 [ ICE-8793 ]
          Hide
          Ken Fyten added a comment -

          I've retested showcase with these latest changes in place. Now the ordering of the theme CSS is incorrect both when coalesced and not.

          The new behaviour has the theme css being loaded after the coalesced.css (or after other component and application CSS when not coalesced). This is incorrect as it makes it impossible for the application to override/customize the theme styling if the theme css is not loaded before the application css. Generally, the theme css needs to be loaded first.

          I did notice that the theme.css is no longer included in the coalesced.css file, which avoids the issue noted in ICE-9166, so that JIRA could probably be marked FIXED due to these changes.

          In addition, the ace:themeSelect component now longer takes effect until the page is reloaded or navigated away from, whether or not coalescing is active. Previously, the theme change would take effect immediately when changed on the page (via a forced page refresh).

          Show
          Ken Fyten added a comment - I've retested showcase with these latest changes in place. Now the ordering of the theme CSS is incorrect both when coalesced and not. The new behaviour has the theme css being loaded after the coalesced.css (or after other component and application CSS when not coalesced). This is incorrect as it makes it impossible for the application to override/customize the theme styling if the theme css is not loaded before the application css. Generally, the theme css needs to be loaded first. I did notice that the theme.css is no longer included in the coalesced.css file, which avoids the issue noted in ICE-9166 , so that JIRA could probably be marked FIXED due to these changes. In addition, the ace:themeSelect component now longer takes effect until the page is reloaded or navigated away from, whether or not coalescing is active. Previously, the theme change would take effect immediately when changed on the page (via a forced page refresh).
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Ken Fyten added a comment -

          Attached snapshots of the various head states that demonstrate the incorrect ordering of the theme.css.

          Show
          Ken Fyten added a comment - Attached snapshots of the various head states that demonstrate the incorrect ordering of the theme.css.
          Ken Fyten made changes -
          Attachment 1stNavAfterThemeChange.png [ 15817 ]
          Attachment 1stPgLoad.png [ 15818 ]
          Attachment 1stnavAfterThemeChange-Coalesced.png [ 15819 ]
          Attachment 1stPgLoad-Coalesced.png [ 15820 ]
          Ken Fyten made changes -
          Link This issue blocks ICE-9166 [ ICE-9166 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #34467 Thu Apr 18 17:03:14 MDT 2013 mircea.toma ICE-9163 Modified bridge to keep the list of current link refs up to date. This way CSS that was once interpreted will re-applied whenever is referenced again.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/pushbutton/PushButtonRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tree/TreeRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/themeselect/ThemeSelectRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/application.js
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/linkbutton/LinkButtonRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTableRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/checkboxbutton/CheckboxButtonRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/context/DOMPartialViewContext.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tableconfigpanel/TableConfigPanelRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/util/ComponentUtils.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/submitmonitor/SubmitMonitorRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datetimeentry/DateTimeEntryRenderer.java
          Hide
          Mircea Toma added a comment -

          Introduced AddTheme system event listener that adds the theme resource before the view is rendered. Changed CoalescedResource.userAgentNeedsUpdate to return true when the browser request is missing if-modified-since header. Modified ResourceHandler to recalculated the list on every GET, instead of just the first one. Added org.icefaces.generateHeadUpdate to the showcase web.xml.

          Show
          Mircea Toma added a comment - Introduced AddTheme system event listener that adds the theme resource before the view is rendered. Changed CoalescedResource.userAgentNeedsUpdate to return true when the browser request is missing if-modified-since header. Modified ResourceHandler to recalculated the list on every GET, instead of just the first one. Added org.icefaces.generateHeadUpdate to the showcase web.xml.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #34504 Tue Apr 23 06:45:44 MDT 2013 mircea.toma ICE-9183, ICE-9163 Introduced AddTheme system event listener that adds the theme resource before the view is rendered. Changed CoalescedResource.userAgentNeedsUpdate to return true when the browser request is missing if-modified-since header. Modified ResourceHandler to recalculated the list on every GET, instead of just the first one. Added org.icefaces.generateHeadUpdate to the showcase web.xml.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/CoalescingResource.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/WEB-INF/web.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/META-INCLUDE/faces-config.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/fixjsf.js
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/CoalescingResourceHandler.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 #34505 Tue Apr 23 09:25:44 MDT 2013 mircea.toma ICE-9163 Replace & instances in the matched link URLs so that the comparision works against the URL extracted from link elements.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/fixjsf.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #34525 Thu Apr 25 05:42:46 MDT 2013 mircea.toma ICE-9163 Moved AddTheme class into ThemeSelectRenderer class. Modified themeSelect behaviour to reload the page if ace:ajax is used when reacting to theme changes. Read default theme from context-parameter when initial theme is not defined. Removed org.icefaces.generateHeadUpdate from "showcase" web.xml.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/themeselect/ThemeSelectRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/themeselect/themeselect.js
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/WEB-INF/web.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/META-INCLUDE/faces-config.xml
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/javascript/fixjsf.js
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/renderkit/HeadRenderer.java
          Hide
          Mircea Toma added a comment -

          Moved AddTheme class into ThemeSelectRenderer class. Modified theme select behaviour to reload the page if ace:ajax is used to react to theme changes. Read default theme from context-parameter when initial theme is not defined. Removed org.icefaces.generateHeadUpdate from "showcase" web.xml.

          Show
          Mircea Toma added a comment - Moved AddTheme class into ThemeSelectRenderer class. Modified theme select behaviour to reload the page if ace:ajax is used to react to theme changes. Read default theme from context-parameter when initial theme is not defined. Removed org.icefaces.generateHeadUpdate from "showcase" web.xml.
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s EE-3.3.0.GA [ 10572 ]
          Ken Fyten made changes -
          Security Private [ 10001 ]
          Ken Fyten made changes -
          Fix Version/s 4.0 [ 11382 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: