1. #1
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    123
    Vote Rating
    0
    BuckBazooka is on a distinguished road

      0  

    Exclamation Local Store for Combobox

    Local Store for Combobox


    Hi,
    I would like to do the following or something equivalent with the Designer.
    Code:
    {
           	xtype:'combo'
           	,fieldLabel: 'Contract Type*'
            ,store: ['FixedPrice', 'Mixed', 'PayAsYouGo']     /// <<------
            ,name:'contractType'
            ,typeAhead: true
            ,forceSelection: true
            ,triggerAction: 'all'
            ,emptyText:'Select a contract type...'
            ,selectOnFocus:true
          	,allowBlank:false
    }
    I think that is so useful that it would really be a shame to have to design a store and specify a URL to fetch from a server when this can all be done by a simple local store.


    Could we not add a "localStore" setting when one can simply specify the list of items which goes in the combo?

  2. #2
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    123
    Vote Rating
    0
    BuckBazooka is on a distinguished road

      0  

    Exclamation


    I come to the conclusion that the Designer does not support at all Local Store, and that Combobox are also not supported.
    I tried many ways. I tried writing my own stores by hand, the good old way, but I did not find a way to attach it to my combobox.
    Of course you can use the id of the store, but what about the other combobox' fields which are needed. E.g. what about "displayField", "valueField", triggerAction:'all'?

    If I am wrong could anyone show my an example of a form with a combobox linked to some static local choices? I mean this is quite fundamental, isn't it?

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    LocalStore will be coming in a future release.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1