Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-5361

Model listeners notified by model relay applier do not respect listener priorities

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 2.0
    • Data Binder
    • None

    Description

      The initial implementation of the new ChangeApplier (for the FLUID-5115 model relay system) currently ignores any "priority" field attached to a listener. It wasn't initially clear what the semantic of this field should be given the lack of one-to-one correspondence in the new system between changes and firings, but work on the metadata component revealed at least one clear use case - model listeners added as instrumentation by the IoC testing framework, for example, should definitely be notified after all listeners forming the implementation, otherwise they will see an incompletely updated condition of the model and view state.

      This was raised in IRC on 5/5/14 -

      https://botbot.me/freenode/fluid-work/msg/14251634/

      The code at this link https://github.com/cindyli/metadata/blob/FLOE-171/tests/js/resourceInputPanelTestUtils.js#L94 reads

                      generatedSequence.push({
                          listenerMaker: "fluid.tests.checkModelValueByIndex",
                          makerArgs: ["{resourceInputPanel}", config.path, testVal, index],
                          spec: {transactional: true, path: "resources", priority: "last"},
                          changeEvent: "{resourceInputPanel}.applier.modelChanged"
                      });
      

      despite the attempt to push the listener to the last place, it ends up being notified before the "updateModel" listener in the implementation.

      Attachments

        Issue Links

          Activity

            People

              antranig Antranig Basman
              antranig Antranig Basman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: