Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-11566

Allow resetting some JSF components state when using ajax

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.7-SNAPSHOT
    • Fix Version/s: 5.6.0-HF18, 5.7.1
    • Component/s: Layouts & Widgets
    • Impact type:
      API added
    • Upgrade notes:
      Hide

      JSF action listener #

      {jsfResetActions.resetComponents}

      can be used in actions that need to reset all components in the same JSF naming container

      Show
      JSF action listener # {jsfResetActions.resetComponents} can be used in actions that need to reset all components in the same JSF naming container

      Description

      There are several components showing cache issues when switching screens/pages only using ajax actions.

      • a "list" widget type is caching its internal state, it is only refreshed correctly when the original data it was mapping differs, but this is not a solution for all use cases (when the initial list is empty, that does not mean that the cache can be kept, for instance)
      • the nxu:valueHolder component also keeps its internal state when set
      • A "shuttle" widget type using the logics made available by the SelectionActionsBean methods (to move up/down, shift from left to right, etc...) are setting the "value" attribute on selectItems components (nxu:selectItems here). This value is kept though ajax calls so are not refreshed correctly when using that kind of logics in ajaxified screens.
      • maybe the chain select components --> to check

      As the states need to be kept when performing ajax actions, a solution would be to define behaviours to reset the cache on some components explicitely, when performing ajax actions that changes the problematic screens.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: