#13420 closed defect (fixed)
MVC - allow data property to be predefined on the prototype of StatefulModel
Reported by: | ben hockey | Owned by: | rahul |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | DojoX MVC | Version: | 1.7.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
StatefulModel? assumes an object is passed to the constructor with a data
property. i'm using composejs (https://github.com/kriszyp/compose) to compose a temporary constructor with all the data mixed in to the prototype and then calling the constructor with no params. this works fine with all of dijit but StatefulModel? won't allow this pattern.
this small change would fix it.
-
StatefulModel.js
349 349 // the data structure. 350 350 // tags: 351 351 // private 352 if(args.data){ 353 this._createModel(args.data); 352 var data = (args && args.data) || this.data; 353 if(data){ 354 this._createModel(data); 354 355 } 355 356 }, 356 357
Change History (4)
comment:1 Changed 8 years ago by
comment:3 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [25762]) allow data to be predefined on StatefulModel? prototype. fixes #13420 !strict
comment:4 Changed 8 years ago by
Milestone: | tbd → 1.7 |
---|
Note: See
TracTickets for help on using
tickets.
Looks OK to me.