FLUID-6698: Allow model relay from constant values

Metadata

Source
FLUID-6698
Type
New Feature
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2021-11-19T12:13:31.668-0500
Updated
2021-11-22T13:49:18.898-0500
Versions
N/A
Fixed Versions
  1. 4.0
Component
  1. Data Binder

Description

When writing "new-style" integral bindings, it can often be useful to relay from constant values. Historically we wrote these inline in the initial model definition - however, not only is this not targettedly overrideable via namespaces, but also it is inconvenient when the model path becomes deeply nested.

We would like to write definitions like the following:

modelRelay: {
         type: {
            value: "range",
            target: "dom.container.attrs.type"
        }

but instead we need a bizarre locution like

modelRelay: {
        type: {
            source: "",
            target: "dom.container.attrs.type",
            func: () => "range"
        }

since we must have a populated "source" definition. Note we can't simply reuse "source" for this since it interprets all bare string values as model paths.

Comments