managedfollowup
9 Dec 2011, 12:16 PM
Hi,
Imagine a login page, user sends up a email and password, and registration details get sent back, so:
I am using a model proxy to a RESTful service at the moment. I can send data up and get the new data, but different json back. It's in the "raw" property but no luck using "set" with this data on the model, like:
model.save({
scope: this,
success: function (data, operation) {
var model2 = this.getRegisterModelModel().create();
model2.set(data.raw);
},
failure: function (records, operation) {
Ext.Msg.alert('Failure', 'Failed to login.');
}
});
Or should I use a store to do it, if so using the syc method or?
Is there a way to call a url just like you can in JQuery? guess this is a custome Proxy?
Please advice with a little code to help me along please, I am finding the Model and Store proxy confusing! cheers. Paul.
Imagine a login page, user sends up a email and password, and registration details get sent back, so:
I am using a model proxy to a RESTful service at the moment. I can send data up and get the new data, but different json back. It's in the "raw" property but no luck using "set" with this data on the model, like:
model.save({
scope: this,
success: function (data, operation) {
var model2 = this.getRegisterModelModel().create();
model2.set(data.raw);
},
failure: function (records, operation) {
Ext.Msg.alert('Failure', 'Failed to login.');
}
});
Or should I use a store to do it, if so using the syc method or?
Is there a way to call a url just like you can in JQuery? guess this is a custome Proxy?
Please advice with a little code to help me along please, I am finding the Model and Store proxy confusing! cheers. Paul.