FLUID-5848: Detect indirect model references from IoC-qualified relay rules and model listeners

Metadata

Source
FLUID-5848
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2016-01-23T15:32:10.386-0500
Updated
2016-07-08T09:06:33.828-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. Data Binder
  2. Framework

Description

The algorithm for parsing IoC-qualified model references in a modelRelay block isn't of sufficiently high quality.

Firstly, when referring to a context which is not resolvable, we get no helpful diagnostic - just a raw exception inside fluid.enlistModelComponent.

Secondly, references to models by paths where the model is not directly nested in the context are not recognised as references to models - for example the following block

modelRelay: {
                    target: "disabled",
                    singleTransform: {
                        type: "fluid.transforms.binaryOp",
                        operator: "===",
                        left: "{chaundles}.model.position",
                        right: "{chaundles}.scrollbar.model.lastPosition"
                    }

The reference to right is not recognised as a live model reference.