PDA

View Full Version : help! How can i changed the data which is from a jsonp request



yibey
31 Mar 2012, 7:51 PM
I am a fresh on Extjs4. Now the problem is that, I can get a specified data from other server.Then it's data format can not meet my request.So I want to changed the data format when i get it.
e g.
my model is fields: ['text', 'id', 'leaf', 'sort'],
my get data [{"fields":[{"name":"text","value":"test"},{"name":"id","value":null},{"name":"leaf","value":null},{"name":"sort","value":null}],id:'8f266b52-8bc7-41ab-89a7-727f96e97033'}]

I just want to know where or which event can let me to change the data format?
Thank you

vietits
1 Apr 2012, 12:13 AM
You can do the transform with convert (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.Field-cfg-convert) config of Ext.data.Field