Add a computed field on a Model
Hi,
I have probably overlooked this one but I can't find how to add a "computed" field on a store via the Designer. By computed I mean the 'fullname' field in the example below:
Code:
Ext.define('app.model.User', {
extend: 'Ext.data.Model',
config: {
fields: ['firstName', 'middleName', 'lastName']
},
fullName: function() {
var d = this.data,
names = [
d.firstName,
d.middleName,
d.lastName
];
return names.join(" ");
}
});
Could you help me ?
Thanks a lot
Regards
Vincent