Reputation: 1606
I have a combo box which listens to a store
{
id: 'filterOrderStatus',
xtype: 'combobox',
fieldLabel: Translation.MailboxListStatus,
store: 'DocumentStatuses',
displayField: 'name',
valueField: 'id',
itemId: 'filterOrderStatus',
// flex: 1,
height: 23,
labelWidth: 45,
width: 130,
cls: 'filterInputField',
listConfig: {
cls: 'comboboxlist-sizefit'
}
The store is a simple ajax store which retrives values. nwo i need to convert the values which he gets into a another language, how could i do that?? here is the store:
Ext.define('xxx.xx.xxx', {
extend: 'Ext.data.Store',
requires: 'xxx.xxx.xx',
model: 'xxx.xxx.xxxx',
autoLoad: true,
proxy: {
type: 'ajax',
api: {
read: ConfigurationData.url + 'xxx.php?xx=xx&xx=xxx'
},
reader: {
type: 'json',
root: 'results',
successProperty: 'success'
}
}
});
Upvotes: 0
Views: 287
Reputation: 3932
In your model you could return the converted record directly as shown
{
name : 'name',
convert : function( value, record ) {
//Your logic to convert the old name(value) into new name.
return name;
}
type: 'string'
},
Upvotes: 1