ICEfaces
  1. ICEfaces
  2. ICE-7138

ace:tabSet additional cacheStatically policies

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta2
    • Fix Version/s: 3.0.RC1, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2 + ace:tabSet
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      The ace:tabSet component allows for static and dynamic caching of tab content. But the existing policy is a little limited, of either always being dynamic or always being static. For example, when a statically cached tab is the current tab, then it still will still be static, so input components won't get to render any new values that the user had just entered. As well, when using dynamic caching, even the non-active tabs render their non-visible contents. So we should probably come up with several different policies that applications may choose between.

      An attempt to make static automatically change to dynamic, when it's the active tab, failed, since the old dom contents were no longer there to difference against, so it resulted in completely uncaching the tab. So, once you go static, you only want to go dynamic if you plan on updating that tab's content completely.

      cacheMethod:
        none
        dynamic
        static
        dynamicRevertStatic
        staticExceptDynamicWhenChildPostback

      If a static tabPane wants to temporarily switch to being dynamic, for just the current iifecycle, then there's a bunch of boilerplate code that the application has to write to manage that one-off switch and revert of the setting. We could instead add an edge policy such as dynamicRevertStatic, which would cause the tabPane component to temporarily behave as dynamic, but the itself switch the property back to static when done the current lifecycle's processing.

      When a tabPane is statically cached, but has input or command components in it, then we need a policy to make it dynamic only when the child input or command component has done a postback, which would be the staticExceptDynamicWhenChildPostback mode.

        Issue Links

          Activity

          Mark Collette created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Assignee Mark Collette [ mark.collette ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.1-Beta [ 10291 ]
          Assignee Priority P2
          Ken Fyten made changes -
          Comment [ A comment with security level 'icesoft-internal-developers' was removed. ]
          Ken Fyten made changes -
          Salesforce Case []
          Fix Version/s 2.1-Beta [ 10291 ]
          Assignee Priority P2
          Assignee Mark Collette [ mark.collette ]
          Mark Collette made changes -
          Salesforce Case []
          Description The ace:tabSet component allows for static and dynamic caching of tab content. But the existing policy is a little limited, of either always being dynamic or always being static. For example, when a statically cached tab is the current tab, then it still will still be static, so input components won't get to render any new values that the user had just entered. As well, when using dynamic caching, even the non-active tabs render their non-visible contents. So we should probably come up with several different policies that applications may choose between.

          cacheMethod:
            dynamicAlways
            staticAlways
            dynamicWhenActiveStaticOtherwise

          Also, if a staticAlways tabPane wants to temporarily switch to being dynamic, for just the current iifecycle, then there's a bunch of boilerplate code that the application has to write to manage that one-off switch and revert of the setting. We could instead add an edge policy such as staticAlwaysExceptNow, which would cause the tabPane component to temporarily behave as dynamic, but the itself switch the property back to staticAlways when done the current lifecycle's processing.
          The ace:tabSet component allows for static and dynamic caching of tab content. But the existing policy is a little limited, of either always being dynamic or always being static. For example, when a statically cached tab is the current tab, then it still will still be static, so input components won't get to render any new values that the user had just entered. As well, when using dynamic caching, even the non-active tabs render their non-visible contents. So we should probably come up with several different policies that applications may choose between.

          An attempt to make static automatically change to dynamic, when it's the active tab, failed, since the old dom contents were no longer there to difference against, so it resulted in completely uncaching the tab. So, once you go static, you only want to go dynamic if you plan on updating that tab's content completely.

          cacheMethod:
            none
            dynamic
            static
            dynamicRevertStatic
            staticExceptDynamicWhenChildPostback

          If a static tabPane wants to temporarily switch to being dynamic, for just the current iifecycle, then there's a bunch of boilerplate code that the application has to write to manage that one-off switch and revert of the setting. We could instead add an edge policy such as dynamicRevertStatic, which would cause the tabPane component to temporarily behave as dynamic, but the itself switch the property back to static when done the current lifecycle's processing.

          When a tabPane is statically cached, but has input or command components in it, then we need a policy to make it dynamic only when the child input or command component has done a postback, which would be the staticExceptDynamicWhenChildPostback mode.
          Hide
          Ken Fyten added a comment -

          I'm investigating an auto mode where it becomes dynamic if either of these is true:

          • if render==@all and javax.faces.source or ice.event.captured is equal or within the tabPane
          • if render regions are specific and any equal or within the tabPane.

          That should cover any random input or command component being used interacted within the tabPane or an f:ajax menuitem that specifically updates the tabPane but is outside of it.

          • Mark
          Show
          Ken Fyten added a comment - I'm investigating an auto mode where it becomes dynamic if either of these is true: if render==@all and javax.faces.source or ice.event.captured is equal or within the tabPane if render regions are specific and any equal or within the tabPane. That should cover any random input or command component being used interacted within the tabPane or an f:ajax menuitem that specifically updates the tabPane but is outside of it. Mark
          Ken Fyten made changes -
          Summary ace:tabSet additional caching policies ace:tabSet additional cacheStatically policies
          Environment ICEfaces 2 + ACE ICEfaces 2 + ace:tabSet
          Salesforce Case []
          Fix Version/s 2.1 [ 10241 ]
          Affects [Documentation (User Guide, Ref. Guide, etc.)]
          Assignee Priority P1
          Affects Version/s 2.1-Beta2 [ 10294 ]
          Affects Version/s 2.1 [ 10241 ]
          Assignee Mark Collette [ mark.collette ]
          Hide
          Mark Collette added a comment -

          Ended up going with a cache property that could either be:

          none
          dynamic
          static
          staticAuto
          dynamicRevertStaticAuto

          where staticAuto encapsulates the concept of a command/input component within a tab allowing it to automatically being dynamic for that lifecycle, and dynamicRevertStaticAuto is when some action outside the tab will change the contents for just one lifecycle, and then it should return to its usual staticAuto mode.

          This involved replacing the cachedOnClient and cachedStatically properties with a cache property.

          Development branch
          Subversion 26314

          Show
          Mark Collette added a comment - Ended up going with a cache property that could either be: none dynamic static staticAuto dynamicRevertStaticAuto where staticAuto encapsulates the concept of a command/input component within a tab allowing it to automatically being dynamic for that lifecycle, and dynamicRevertStaticAuto is when some action outside the tab will change the contents for just one lifecycle, and then it should return to its usual staticAuto mode. This involved replacing the cachedOnClient and cachedStatically properties with a cache property. Development branch Subversion 26314
          Ken Fyten made changes -
          Link This issue blocks ICE-7450 [ ICE-7450 ]
          Evgheni Sadovoi made changes -
          Salesforce Case [5007000000JN4wJ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #26469 Fri Nov 18 13:24:15 MST 2011 ken.fyten ICE-7138 ace:tabSet additional cacheStatically policies
          ICE-7044 ace:tabSet use DOM difference don't compare don't update element sub-tree (new cache attribute)
          ICE-6527 Dynamically adding/removing ace:tabPane Results in ace:tabset Retrieving Entire Tabset Content
          ICE-6738 Add client-side cache support for ace:tabPane within a 'clientSide=false'
          ICE-7057 Implement Themeroller support for ace:tabSet
          ICE-7176 ace:tabSet now does not depend on yui3 or 2in3, but instead YUI 2.8.
          ICE-6970 Adopted Apache 2.0 license source-code headers for ACE source-code.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabPaneMeta.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetProxyMeta.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/tabset/tabset.js
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabPane.java
          Commit graph DEL /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/tab
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/tabset/tabset.css
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetRenderer.java
          Commit graph ADD /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabPaneCache.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetMeta.java
          Commit graph DEL /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/skins
          Commit graph ADD /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset
          Commit graph ADD /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/tabset
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/Tabs.java
          Commit graph DEL /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tab
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetProxy.java
          Commit graph ADD /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabPaneUtil.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSet.java
          Ken Fyten made changes -
          Fix Version/s 3.1 [ 10312 ]
          Fix Version/s 3.0 [ 10241 ]
          Mark Collette made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Fix Version/s 3.0.RC1 [ 10300 ]
          Fix Version/s 3.1 [ 10312 ]
          Ken Fyten made changes -
          Fix Version/s 3.0 [ 10241 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Mark Collette
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: