Opened 12 years ago

Closed 12 years ago

#10706 closed defect (duplicate)

JsonRestStore.onNew(item) is not consistent with the Notification API (offers no parentInfo)

Reported by: coa Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: DojoX Data Version: 1.4.0
Keywords: JsonRestStore, Notification API, onNew, parentInfo Cc:
Blocked By: Blocking:


The reason is that onNew is called before parentInfo is applied in JsonRestStore?.newItem

In JsonRestStore?.newItem:

data = new this._constructor(data);
	// sets parent info...

In JsonRestStore?.constructor:

this._constructor = function(data){, data);

Moving the call to 'onNew' to newItem is not a solution, as it would give no notification to those using the constructor alone.

Perhaps a second boolean argument to this._constructor to wait with onNew, and then call it in newItem? Not really nice, but I guess it would work.

Change History (4)

comment:1 Changed 12 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

comment:2 Changed 12 years ago by bill

See also #9801.

comment:3 Changed 12 years ago by coa

This is definitely a duplicate of #9801, so I posted my comments there.

Perhaps this should be closed and #9801 re-opened?

comment:4 Changed 12 years ago by Kris Zyp

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.