Results 1 to 3 of 3

Thread: Load from a record a multi select combo

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    41
    Answers
    5

    Default Load from a record a multi select combo

    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.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,448
    Answers
    3997

    Default

    You would have to resolve the combo from the view:

    Code:
    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.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    41
    Answers
    5

    Default

    Custom loading; not ideal but I guess it would work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •