1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
    TriAnarchy is on a distinguished road

      0  

    Default Answered: ExtJs 4.0 Tutorial issues.

    Answered: ExtJs 4.0 Tutorial issues.


    Hello, I am trying to go through this tutorial:

    http://docs.sencha.com/ext-js/4-0/#!...n_architecture

    I am getting to the part where the view is supposed to become visible, however, instead I get an error in the console that says 'TypeError: name is undefined'.

    I believe all my code is correct, I have index.html with:

    Code:
    <html>
    <head>
        <title>Hello Ext</title>
    
        <link rel="stylesheet" type="text/css" href="ExtJs/ext-4.1.1a/resources/css/ext-all.css">
        <script type="text/javascript" src="ExtJs/ext-4.1.1a/ext-debug.js"></script>
        <script type="text/javascript" src="app.js"></script>
    </head>
    <body></body>
    </html>

    app.js

    Code:
    Ext.application({
        name: 'AM',
    
        appFolder: 'app',
        controllers: ['Users'],
    
        launch: function() {
            Ext.create('Ext.container.Viewport', {
                layout: 'fit',
                items: {
                    xtype: 'userList'
                }
            });
        }
    });
    app/controller/Users.js with

    Code:
    Ext.define('AM.controller.Users', {
        extend: 'Ext.app.Controller',
        views: [
            'user.List'],
    
        init: function() {
            this.control({
                'viewport > panel': {
                    render: this.onPanelRendered
                }
            });
        },
    
        onPanelRendered: function() {
            console.log('This panel was rendered');
        }
    });
    app/view/user/List.js

    Code:
    Ext.define('AM.view.user.List' ,{
        extend: 'Ext.grid.Panel',
        alias : 'widget.userlist',
    
        title : 'All Users',
    
        initComponent: function() {
            this.store = {
                fields: ['name', 'email'],
                data  : [
                    {name: 'Ed',    email: 'ed@sencha.com'},
                    {name: 'Tommy', email: 'tommy@sencha.com'}
                ]
            };
    
            this.columns = [
                {header: 'Name',  dataIndex: 'name',  flex: 1},
                {header: 'Email', dataIndex: 'email', flex: 1}
            ];
    
            this.callParent(arguments);
        }
    });

    Can anyone tell me what's wrong? Thank you.

  2. Instead of having views on the controller, try putting it on the application to see if it loads from there. The issue is the class is not being loaded.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3356
    Vote Rating
    750
    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


    Instead of having views on the controller, try putting it on the application to see if it loads from there. The issue is the class is not being loaded.
    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.

  4. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    6
    Vote Rating
    0
    TriAnarchy is on a distinguished road

      0  

    Default Answered

    Answered


    I was able to reslve the issue, it was due to the changing of capitalization of userList. I am not sure how to mark this as 'answered'.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar