FLUID-6746: Corruption in notifying initial transaction relays where multiple initial model values are merged

Metadata

Source
FLUID-6746
Type
Bug
Priority
Major
Status
Reopened
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2022-07-15T06:25:26.159-0400
Updated
2022-12-21T10:11:49.464-0500
Versions
  1. 4.3
Fixed Versions
  1. 6.0
Component
  1. Data Binder

Description

In progress in https://github.com/continuing-creativity/youme/pull/2/files#diff-a133c4af0eace1a751ecd7cc8a393c78a6d11f723172b22386399a38a856705bR37 -

There is a use of integral bindings where multiple initial model values are provided - there are the in-component defaults of

model: {
            errorString: false,
            editorString: ""
        },

and then the subcomponent initial defaults of

hex: {
                type: "youme.demos.console.textareaWithError",
                container: "{that}.dom.hex",
                options: {
                    model: {
                        errorString: "{console}.model.hexError",
                        editorString: "{console}.model.hexString"
                    }

We see something bizarre happening, that during fluid.notifyInitModelWorkflow somehow the "new" and "old" model values are reversed - the relays are notified as if the in-component defaults are the upcoming new values, overwritng the subcomponent defaults. However, once the component actually finishes initialising in ChangeApplier.initiate.commit, we see the initial and final models the right way round, and regular model listeners are notified in the ordinary way. This makes integral bindings pretty unusable in this case. #

The workaround is to remove the in-component default values, e.g. editorString: "" in youme.demos.console.textareaWithError and jsonString: "" in youme.demos.console

Comments