1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    starsale is on a distinguished road

      0  

    Default Unanswered: Page is loading but doesn't display anything

    Unanswered: Page is loading but doesn't display anything


    Hello,

    If got this code but it doesn't display anything, When i say "(Ext.create('Ext.DataView', { )" it displays but i cannot navigate anymore. When i use it after a "show: function()" it also doesn't navigate.


    Code:
    Ext.define('Myapp.view.Aboutlist', {
        extend: 'Ext.DataView',
        xtype: 'aboutlist',
        fullscreen: true,   
    
    
        defaults: {        
                cls: 'productInformation',        
                            styleHtmlContent: true,                     
         },    
                 
        store: {
            autoLoad: true,
            fields: ['jsonName','Title','Content'],  
    
    
            proxy: {
                type: 'ajax',
                url: 'data/aboutus.json',
    
    
                reader: {
                    type: 'json',
                    rootProperty: 'aboutus'
                }
            }
        },
    
    
        itemTpl:  '<center><div id="headerProduct"> <h2>{Title}</h2>{Content}</div></center>' 
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,017
    Answers
    3491
    Vote Rating
    849
    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


    When using Ext.define, everything needs to go into the config object

    Code:
    Ext.define('Myapp.view.Aboutlist', {
        extend: 'Ext.dataview.DataView',
        xtype: 'aboutlist',
    
        config : {
            fullscreen: true,
            defaults: {
                cls: 'productInformation',
                styleHtmlContent: true
            },
            store: {
                autoLoad: true,
                fields: ['jsonName','Title','Content'],
                proxy: {
                    type: 'ajax',
                    url: 'data/aboutus.json',
                    reader: {
                        type: 'json',
                        rootProperty: 'aboutus'
                    }
                }
            },
            itemTpl:  '<center><div id="headerProduct"> <h2>{Title}</h2>{Content}</div></center>'
        }
    });
    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.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    starsale is on a distinguished road

      0  

    Default Replay: Nothing displayed

    Replay: Nothing displayed


    If I put everything in the config nothing is displayed, can you explain why?

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,017
    Answers
    3491
    Vote Rating
    849
    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


    Is the store loading properly?
    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.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    starsale is on a distinguished road

      0  

    Default Doesn't display anything

    Doesn't display anything


    Yes, if i use "Ext.create('Ext.DataView', { " instead of "Ext.define('Myapp.view.Aboutlist', {"
    I get to see everything but i want to use it after the tab panel.

Thread Participants: 1

Tags for this Thread