1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    45
    Vote Rating
    0
    SButts is on a distinguished road

      0  

    Default dataview.List store property

    dataview.List store property


    When attempting to set the store property of a dataview.List control to a store config object it is stored as a string and the store is not created. Here is the generated code. Am I missing something?

    Code:
    {
       xtype: 'list',
       height: '200px',
       itemTpl: [ '{text}'],
       store: '{
                     storeId:"popupPanleListDID",
                     fields: ["text","value"],
                     data: [{text:"Item1",value:1}, {text:"Item2",value:2}, text:"Item3",value:3}, text:"Item4",value:4}]}'
    }
    If i use SenchaFiddle and set the store property to an object everything works just fine. Any suggestions?

  2. #2
    Sencha - Architect Dev Team dfoelber's Avatar
    Join Date
    Sep 2011
    Location
    Rockville, MD
    Posts
    96
    Vote Rating
    12
    dfoelber will become famous soon enough

      0  

    Default


    Hi,

    You can either create the store as a top level component and reference it as a string, or use initialize() on the list to set the store as another type.

    http://docs.sencha.com/architect/2/#...nel-section-10
    David Foelber
    @davidfoelber
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    45
    Vote Rating
    0
    SButts is on a distinguished road

      0  

    Default


    Thanks, creating the store as a top level component is what I ended up doing.

Thread Participants: 1