Results 1 to 2 of 2

Thread: Problems with itemselectorfield and stores / chained store

    You found a bug! We've classified it as EXTJS-14400 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Feb 2012

    Default Problems with itemselectorfield and stores / chained store

    I've found the following issues with the itemselector field in Ext JS 5:
    • Attempting to instantiate an itemselectorfield with a chained store results in an error: "Uncaught TypeError: Cannot read property 'autoCreated' of null".
    • You must specify a store when the itemselector is instantiated, otherwise you get an error. But watch out, the itemselector somehow mucks up this store instance. This causes problems for other components that also use that store. Also, if you create a new instance of your itemSelector later, it will choke for the same reason (because the previous itemselector instance already screwed up the store).
    • You can get the itemselector to use a chained store by calling itemSelector.setStore(chainedStore) after the itemselector is instantiated. But this means instantiating it with a redundant store instance (which will get screwed up).
    • fromTitle and toTitle config properties are not documented.
    • You need to manually include the ItemSelector.css file in app.json. Not documented anywhere...
    My solution to the store issues:
    var mySelector = Ext.widget({
        xtype: 'itemselectorfield',
        // store: chainedStore, // Doesn't work.
        // store: '', // Bad idea, the itemselector screws around with this store.
        store: new{ // Workaround: a temporary store instance that gets discarded.
            model: 'MyApp.model.ProperModel'
        displayField: 'Name',
        valueField: 'Id',
        fromTitle: 'Compatible devices', // This property should be documented
        toTitle: 'Target devices',  // This property should be documented
    mySelectorField.setStore(myChainedStore); // which was all I wanted in the first place.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL


    Thanks for the report! I have opened a bug in our bug tracker.

Tags for this Thread

Posting Permissions

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