PDA

View Full Version : Get json respons in datamodel and then in form.



Nostromo
15 Sep 2010, 6:42 AM
Hi!

I do the following to get a json response:



Ext.Ajax.request({
url: '/Service1.svc/GetEenBoek?str=hallo',
method: 'GET',
success: function(response) {
console.dir(response.responseText);
var data = Ext.decode(response.responseText);

//How to get data in my form?
}
});


Al works fine and I get valid Json return. After Ext.decode the values are stored in data.
How do I then get those values from data to show up in my form.
My form has a data model, but I cant seem to figure out how to load the data from the data variable to my datamodel.

Thanks in advance...