PDA

View Full Version : Load from a record a multi select combo



Scott-1
24 Oct 2013, 10:40 AM
I want to
Ext.define('ACM.model.account.Header', {
extend: 'Ext.data.Model',
idProperty: 'id',
fields: [
{name: 'id', type: 'int'},
***Order Fields***
],
hasMany : {model: 'ACM.model.nameValue', name: 'excludeEventTypes'},
});

I have a function that gets my view and binds the
var view = Ext.ComponentQuery.query('accountview')[0];
if (!view){
return;
}
view.loadRecord(accountCommission);

Now in that view I have excludeEventType combo box with multi-select capabilities, It does not bind since it accepts an array not an association.

mitchellsimoens
28 Oct 2013, 12:34 PM
You would have to resolve the combo from the view:


var combo = view.down('combobox');

and then you can use the collect method on the store to get an array of values dependent on the field you pass it.

Scott-1
29 Oct 2013, 4:00 AM
Custom loading; not ideal but I guess it would work.