Opened 11 years ago
Closed 11 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: |
Description
The reason is that onNew is called before parentInfo is applied in JsonRestStore?.newItem
In JsonRestStore?.newItem:
data = new this._constructor(data); if(parentInfo){ // sets parent info... }
In JsonRestStore?.constructor:
this._constructor = function(data){ constructor.call(this, data); self.onNew(this); }
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 11 years ago by
Owner: | changed from Jared Jurkiewicz to Kris Zyp |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
comment:4 Changed 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
See also #9801.