Results 1 to 10 of 12

Thread: activeItem not updating panel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    73
    Vote Rating
    -1
      0  

    Default activeItem not updating panel

    Shouldn't this code go the second panel? It's not

    Code:
    var viewport = Ext.create('Ext.Panel', {
                fullscreen: true,
                id:'mainViewport',
                layout: 'card',
                activeItem: 1,
                items: [{
                     xtype: 'LoginForm'
                     },{
                     xtype: 'MainPunchApp'
                }],
                
            });

  2. #2
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Answers
    93
    Vote Rating
    7
      0  

    Default

    That should work. It is working for me:

    Code:
    Ext.setup({    
        onReady: function() {
            Ext.Viewport.add({
                layout: 'card',
                fullscreen: true,
                activeItem: 1,
                items: [
                    { html: 'First card' },
                    { html: 'Second card' }
                ]
            });
        }
    });
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    73
    Vote Rating
    -1
      0  

    Default Here is my full code that does not work

    I changed xtype to html to see if that would help but that didn't

    HTML Code:
    Ext.application({
        name: 'testApp',
        controllers: ['test1, test2'],
        launch: function() {
            var viewport = Ext.create('Ext.Panel', {
                fullscreen: true,
                id:'mainViewport',
                layout: 'card',
                activeItem: 1,
                items: [
                    {html: 'LoginForm'},
                    {html: 'MainPunchApp'}
                ],
                
            });
        }
         
    });

  4. #4
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Answers
    93
    Vote Rating
    7
      0  

    Default

    Did you try my exact code? What version are you running?
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  5. #5
    Sencha User
    Join Date
    Nov 2010
    Posts
    73
    Vote Rating
    -1
      0  

    Default sencha-touch-2.0.0-pr1

    I am new to touch2 and the way I have it setup is how the examples show to setup an application. Not real sure how to implement your code into this application. Did you happen to try the code the way I have it setup?

    Thanks for all your help!

  6. #6
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Answers
    93
    Vote Rating
    7
      0  

    Default

    Checkout PR2, and let me know if it works then. I think there was an issue with activeItem in PR1.

    http://www.sencha.com/forum/announcement.php?f=90&a=17
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •