Hybrid View

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    129
    Vote Rating
    -4
    Answers
    1
    sudhirkd can only hope to improve

      0  

    Default Unanswered: Simple NestedList not showing up ! (sencha beta 3)

    Unanswered: Simple NestedList not showing up ! (sencha beta 3)


    I am using NestedList code from documentation as is. Just doesn't work ! Anything wrong in following ? Shows empty when displayed. I have been trying my own code but realized this simple code also does not work.
    Code:
    var data = {
         text: 'Groceries',
         items: [{
             text: 'Drinks',
             items: [{
                 text: 'Water',
                 items: [{
                     text: 'Sparkling',
                     leaf: true
                 }, {
                     text: 'Still',
                     leaf: true
                 }]
             }, {
                 text: 'Coffee',
                 leaf: true
             }, {
                 text: 'Espresso',
                 leaf: true
             }, {
                 text: 'Redbull',
                 leaf: true
             }, {
                 text: 'Coke',
                 leaf: true
             }, {
                 text: 'Diet Coke',
                 leaf: true
             }]
         }, {
             text: 'Fruit',
             items: [{
                 text: 'Bananas',
                 leaf: true
             }, {
                 text: 'Lemon',
                 leaf: true
             }]
         }, {
             text: 'Snacks',
             items: [{
                 text: 'Nuts',
                 leaf: true
             }, {
                 text: 'Pretzels',
                 leaf: true
             }, {
                 text: 'Wasabi Peas',
                 leaf: true
             }]
         }]
     };
    
    
     Ext.define('ListItem', {
         extend: 'Ext.data.Model',
         fields: [{
             name: 'text',
             type: 'string'
         }]
     });
    
    
     var store = Ext.create('Ext.data.TreeStore', {
         model: 'ListItem',
         defaultRootProperty: 'items',
         root: data
     });
    
    
     var nestedList = Ext.create('Ext.NestedList', {
         fullscreen: true,
         title: 'Groceries',
         displayField: 'text',
         store: store
     });
    
    Ext.application({
        name: 'xyz',
        phoneStartupScreen: 'images/b.jpg',
        launch: function() {
    
    
     var nestedList = Ext.create('Ext.NestedList', {
         fullscreen: true,
         title: 'Groceries',
         displayField: 'text',
         store: store      
    
        }
    });

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    129
    Vote Rating
    -4
    Answers
    1
    sudhirkd can only hope to improve

      0  

    Default


    Jamie - This is the issue I was talking about in other thread.

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Answers
    17
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    So this runs fine in B3, but there are some warnings that need to be fixed. So it will only run in Compat mode until those are fixed. In particular this issue:

    [WARN] fields is deprecated as a property directly on the Model prototype. Please put it inside the config object.

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    129
    Vote Rating
    -4
    Answers
    1
    sudhirkd can only hope to improve

      0  

    Default


    Thanks. I am not sure if I understand you correctly. Do you mean this is known issue and current workaround is to use compact mode of senchatouch-all ?

  5. #5
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Answers
    17
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    If you want to use deprecated methods, then you have to use the compat build.

    Sencha Inc

    Jamie Avins

    @jamieavins

Thread Participants: 1

Tags for this Thread