aaron7744
21 Sep 2011, 10:50 PM
i have a model like:
Ext.define('ResultDetail', {
extend : 'Ext.data.Model',
fields : [ {
name : 'id',
type : 'int'
}, {
name : 'email',
type : 'string'
} ],
hasMany : [ {
model : 'Testresults',
name : 'testresultsbeans'
} ],
proxy : {
type : 'rest',
url : myurl
},
reader : {
type : 'rest',
root : 'resultDetailBean'
}
});
I can receive the Json-Data from sercer-side and i want to get the record value with:
var ResultDetail = Ext.ModelManager.getModel('ResultDetail');
ResultDetail.load(id,{
success: function(resultDetail,operation) {
var email = resultDetail.get("email");
......
}
});
But this dosent work. Can someone tell me, how to automatic update the model record and get the record value?
Thanks
Ext.define('ResultDetail', {
extend : 'Ext.data.Model',
fields : [ {
name : 'id',
type : 'int'
}, {
name : 'email',
type : 'string'
} ],
hasMany : [ {
model : 'Testresults',
name : 'testresultsbeans'
} ],
proxy : {
type : 'rest',
url : myurl
},
reader : {
type : 'rest',
root : 'resultDetailBean'
}
});
I can receive the Json-Data from sercer-side and i want to get the record value with:
var ResultDetail = Ext.ModelManager.getModel('ResultDetail');
ResultDetail.load(id,{
success: function(resultDetail,operation) {
var email = resultDetail.get("email");
......
}
});
But this dosent work. Can someone tell me, how to automatic update the model record and get the record value?
Thanks