FLUID-6127: Model change listeners are not notified in the case of a DELETE change when they listen on a wildcard path

Metadata

Source
FLUID-6127
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2017-02-09T08:36:52.919-0500
Updated
2017-02-10T11:49:32.775-0500
Versions
  1. 2.0
Fixed Versions
  1. 2.1
  2. 3.0
Component
  1. Data Binder

Description

Model listeners which listen on a wildcard path ending in * are not notified when a DELETE change removes one of the leaves of interest - for example, with this definition:

modelListeners: {
            updateComponentView: {
                path: "idToPath.*",
                funcName: "fluid.author.componentGraph.updateComponentView",
                args: ["{that}", "{change}.path", "{change}.value"]
            }

a change of that.applier.change("idToPath.thing", null, "DELETE") will not trigger the notification. The logic in fluid.matchChanges is faulty and is not prepared for this case.

Comments