FLUID-5286: Improve parsing of model references in "change" records to support arrays of path segments and "broken-out" records

Metadata

Source
FLUID-5286
Type
Improvement
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2014-03-11T16:49:30.840-0400
Updated
2016-08-18T11:39:20.619-0400
Versions
N/A
Fixed Versions
  1. 2.0
Component
  1. Data Binder
  2. IoC System

Description

The "currency converter" sample at http://wiki.fluidproject.org/display/docs/Evented+Components could be written with one less coded invoker if it were possible to specify IoC-resolved arrays of path segments as parts of "changePath" records - for example, we could have written the invoker definition for "updateRate" as

updateRate: {
    changePath: ["rates", "{arguments}.0"],
    value: "{arguments}.1"
    }

this would be rather easy to implement and quite helpful. Currently changePath must be a string which is interpreted by fluid.parseValidModelReference.

We should take the opportunity to support some kind of top-level option such as "targetModel" so that we can easily express references to foreign components without some kind of painful ambiguity in the interpretation of the first path segment.

Comments