ICEfaces
  1. ICEfaces
  2. ICE-9166

Resource Coalescing incompatibility with ace:themeSelect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: ACE-Components, Framework
    • Labels:
      None
    • Environment:
      ICEfaces 3.3, "org.icefaces.coalesceResources=true", ace:themeSelect component
    • Assignee Priority:
      P1
    • Affects:
      Compatibility/Configuration
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      A suitable work-around for this issue is to force the page to be reloaded whenever the user changes the theme via the ace:themeSelect component. This will send another GET request, which will result in the coalesced.css file being regenerated and including the newly selected theme, which will avoid the issue, although we will still be loading the theme css twice.

      An example of the required technique will be added to the ICEfaces Showcase sample application.
      Show
      A suitable work-around for this issue is to force the page to be reloaded whenever the user changes the theme via the ace:themeSelect component. This will send another GET request, which will result in the coalesced.css file being regenerated and including the newly selected theme, which will avoid the issue, although we will still be loading the theme css twice. An example of the required technique will be added to the ICEfaces Showcase sample application.

      Description

      There is an incompatibility between using the ace:themeSelect component in conjunction with "org.icefaces.coalesceResources=true".

      The issue is caused by the initial theme .css resources being included in the coalesced CSS file. Here is a breakdown of the sequence of events:

      1. The coalesced CSS file is generated initially when the page is first loaded via GET, includes the currently selected theme .css at this time (say "Sam").

      2. User selects a difference theme (say "Swanky-purse") using the ace:themeSelector component.

      3. The "Swanky-purse" theme css is specify at the top of the head section correctly, but since the original "Sam" theme resources are included in the coalesced.css file after that, it overrides most or all of the theme styles back to Sam, so "Swanky-purse" styles are lost.

      Possible fix for this issue are to somehow indicate the theme files shouldn't be included in the coalesced.css.

        Issue Links

          Activity

          Hide
          Mircea Toma added a comment -

          The #34525 commit for ICE-9163 implements the page loading directly into themeselect.js (at Ken's recommandation).

          Show
          Mircea Toma added a comment - The #34525 commit for ICE-9163 implements the page loading directly into themeselect.js (at Ken's recommandation).
          Hide
          Ken Fyten added a comment -

          Re-opened to modify ace:themeSelect to perform as follows:

          • no ace:ajax, don't submit until the form does, then process the theme change and force a reload.
          • ace:ajax used, do ajax submit on change, force reload of the page.
          Show
          Ken Fyten added a comment - Re-opened to modify ace:themeSelect to perform as follows: no ace:ajax, don't submit until the form does, then process the theme change and force a reload. ace:ajax used, do ajax submit on change, force reload of the page.
          Hide
          Mircea Toma added a comment -

          Modified client side code to reload the page whenever the them was changed, regardless how the form submit was made (triggered by ace:ajax behaviour or some other component submitting the form).

          Show
          Mircea Toma added a comment - Modified client side code to reload the page whenever the them was changed, regardless how the form submit was made (triggered by ace:ajax behaviour or some other component submitting the form).

            People

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

              Dates

              • Created:
                Updated:
                Resolved: