-
10 Sep 2012 12:02 AM #1
Ext.data.Store reader xml does not map values to model
Ext.data.Store reader xml does not map values to model
then i call workitemListStore.loadData(doc); where doc is from new DOMParser().parseFromString(xmlstring, 'text/xml');Code:var store = Ext.create('Ext.data.Store', { model: 'mymodel.model.WorkItemQueue', autoLoad: true, proxy: { type: 'memory', reader: { type: 'xml', rootProperty: 'root', record: 'user', idProperty: 'id' } } });
i actually am able to get the value of the model's id (since I specified it in idProperty). however, the other fields of model User contain null values.
am i missing something? any ideas?
-
11 Sep 2012 12:58 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,666
- Vote Rating
- 435
Why not use an ajax proxy to remotely load the xml?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
11 Sep 2012 2:12 PM #3
i also plan to do that. i just wanted to see how it works if i load it locally through a declared variable with xml string.
i managed to solve it now. the only thing lacking in my model class is that there is no mapping. the docs never mentioned that


Reply With Quote