PDA

View Full Version : Looking for a Simple example with .net WCF and EXT JS



sinclas
21 Nov 2011, 4:10 PM
Hi,

I am looking for a a simple example that help me work with WCF, JSON, AJAX and the ext.model.data to get only the LOAD method of the data model working. Here is what I am looking for in the example:

1) Define a simple model using ext.define that extends the ext.data.model.
2) Proxy has to be AJAX to a WCF svc. that returns JSON.
3) The service is a simple .NET WCF service.

My code below always has a record that is null. I have checked everything and feel its better just to find a working example of where someone has successfully got the load method working with a .NET back end. I can then figure out whats going on. Any links or places to look?? Thanks!


var psUser = Ext.ModelManager.getModel('psUser');
psUser.load(2, {
params: {
id: 2
},
success: function (record, operation) {
var U = record.data.user_nm;
Ext.Msg.alert(record);
},
failure: function (record, operation) {
Ext.Msg.alert('Error', 'Failed to load model from the server.');
}


});

mitchellsimoens
22 Nov 2011, 10:43 AM
I have moved to the Ext JS 4 forum.