Is there a reasonable way in a model to combine two fields, something like this:
Ext.define('model.Person', { extend: 'Ext.data.Model', idProperty: 'Id', fields: [ { name: 'Id', type: 'int' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'FullName', type: 'string', mapping: 'FirstName + " " + LastName' } ] });
I tried many ways, but I can not get them to work.
I was going to use the function in the model to combine the two fields together, but I also need to use this as a display field inside an itemselector (custom control) element and switch it dynamically, and this control does not look like 'FullName ()' as a display field .
Any thoughts were greatly appreciated.
source share