1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    3
    Answers
    3
    bweiler is on a distinguished road

      0  

    Default Unanswered: Ext.dataview.list data configuration not working as expected.

    Unanswered: Ext.dataview.list data configuration not working as expected.


    I am attempting to create a menu without a model and store using the data configuration property of the Ext.dataview.list.

    Here's my code
    Code:
    actionMenu = Ext.create('Ext.Panel', {
    			width: 200,
    			height: 250,
    			items: [
    			    {
    			    	xtype: 'toolbar',
    			    	title: 'Action Menu'
    			    },
    			    {
    				    xtype: 'list',
    				    data: [{label: 'Item 1'}, {label: 'Item 2'}],
    				    itemTpl: '{label}'
    			    }
    			]
    		});
    Is this possible? If so, what am I doing wrong.

    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    Answers
    3566
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The data config is inherited from Ext.Component and serves a different purpose. You should create a simple store and use it.

    Code:
    store : new Ext.data.Store({
        fields : [ 'label' ],
        data   : [{label: 'Item 1'}, {label: 'Item 2'}]
    })
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1