Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17278 closed defect (fixed)

partial rebuild fails when inserting into StatefulArray

Reported by: Stefan Meyer Owned by: Ed Chatelain
Priority: undecided Milestone: 1.9.2
Component: DojoX MVC Version: 1.9.1
Keywords: Cc: Akira Sudoh
Blocked By: Blocking:

Description

WidgetList? listens to StatefulArray? changes via watchElements. Before that event is fired the new elements are inserted into the StatefulArray? as undefined values. Then the values are set in a stateful manner via set(index, value). This leads to a property value change event being fired. The WidgetList? will update the target prop in the child widget. This is where things go wrong. The WidgetList?'s new children are not inserted yet. Therefore the target of the current child widget at the index is updated.

Given a list of names like ["john", "will"]. Inserting a new name "Henry" at index 1 results first in an update of the second widget being bound to "Henry" instead of "will" and then a new widget is inserted at index 1. Effectivly the WidegtList? is now bound to ["john", "henry", "henry"] and the Stateful instances at index 1 and 2 are identical.

The problem can be resolved by not updating the elements in a stateful manner.

I created a pull request for this in edhcat/dojox_mvc Unfortunately I did not find a proper testcase for this in 1,9 so I reactivated one from 1.9.

Change History (6)

comment:1 Changed 6 years ago by Ed Chatelain

Cc: Akira Sudoh added
Owner: set to Ed Chatelain
Status: newassigned

comment:2 Changed 6 years ago by Akira Sudoh

The original pull req to edchat/dojox_mvc is: https://github.com/edchat/dojox_mvc/pull/80

comment:3 Changed 6 years ago by Akira Sudoh

Pull req to dojo/dojox available in: https://github.com/dojo/dojox/pull/39

comment:4 Changed 6 years ago by Ed Chatelain <ed.chatelain@…>

Resolution: fixed
Status: assignedclosed

In 67eec023aee8e042e8f1d9dcc7fd653ee70792a7/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:5 Changed 6 years ago by Ed Chatelain <ed.chatelain@…>

In cc357612faa5190a018af86a9bebc0eb605ebf8f/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 6 years ago by Ed Chatelain

Milestone: tbd1.9.2
Note: See TracTickets for help on using tickets.