-
14 Nov 2011 7:35 AM #1
Model Save
Model Save
Hallo,
i get always a failure when i try to save something in my model.
TypeError: 'true' is not a valid argument for 'in' (evaluating ''listeners' in config')Code:onNodeSelect: function(list, node) { console.log('onNodeSelect'); console.log(node); node.set('name', 'test'); node.save({ success: function() { console.log('erfolgreich'); } }); },
Please help
-
14 Nov 2011 9:52 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Can you provide how your Model/Store is configured.
-
14 Nov 2011 10:41 AM #3
Model, Store and Controller
Model, Store and Controller
Here are more Details...
Model:
Code:Ext.define('Homie.model.Room', { extend : 'Ext.data.Model', requires: 'Homie.model.Node', fields: [ { name: 'id', type: 'int' }, { name: 'name', type: 'string' }, { name: 'type', type: 'string' }, { name: 'count', type: 'int' } ], hasMany: { model: 'Homie.model.Node', name : 'nodes' }, proxy: { type : 'rest', url : apiUrl + 'rooms', reader: 'json' } });
Store:
Controller:Code:Ext.define('Homie.store.Rooms', { extend : 'Ext.data.Store', requires: 'Homie.model.Room', model : 'Homie.model.Room', autoLoad: true });
Code:... onRoomSelect: function(list, room) { console.log('onRoomSelect'); console.log(room); room.set('name', 'test'); room.save({ callback: function() { console.log('erfolgreich'); } }); } ...
-
14 Nov 2011 10:47 AM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Great, thank you for the report.
-
16 Dec 2011 12:29 PM #5Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
This will be fixed as part of the next Touch 2.0 release. Thanks for the report.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1037
in
2.0.


Reply With Quote
