1. #1
    Sencha User
    Join Date
    Sep 2010
    Location
    Amsterdam
    Posts
    22
    Vote Rating
    2
    savelee is on a distinguished road

      0  

    Default (newbie): Is it possible to load an handler via bottom tabpanel?

    (newbie): Is it possible to load an handler via bottom tabpanel?


    Hi there,
    I'm new with Sencha Touch & Ext JS and I have a (simple?) question..
    Is it possible to load an prompt / or put an handler in a tabpanel?
    Cause what I tried did not work:

    Code:
    test.Container = {
        
        /**
        * Variable to hold class object
        * @return {Object}
        */
        classObj : test.Container,
       
    	setLayout:function(){
    
            var tabpanel = new Ext.TabPanel({
    			activeItem: 0,
    			animation: {
                    type: 'cardslide',
                    cover: true
                },
    			cls: 'interface',
                dockedItems: [{
    				cls: 'topbar',
                    dock: 'top',
                    ui : 'light',
                    xtype: 'toolbar',
                    title : 'Test',
                    items:[{
                            xtype:'button',
                            iconMask: true,
                            text : 'About',
                            ui:'action',
                            handler : function(){
    							console.log("home");
                            }
                     }]
                }],
                defaults: {
                    scroll: 'vertical'
                },
    			fullscreen: true,
    			layout: 'hbox',
                items: [
    				{
    					cls: 'tab-home',
    			        iconCls: 'home',
    					items: [test.Home],
    					title: 'Home'
    			    },
    			    {
    					cls: 'tab-settings',
    			        iconCls: 'settings',
                            handler: function() {
    				            Ext.Msg.prompt('Welcome! What s your first name?', Ext.emptyFn);
    				        },
    					title: 'Settings'
    			    },
    			    {
    			        badgeText: '3',
    			        cls: 'tab-fav',
    			        iconCls: 'favorites',
    					items: [test.Favourites],
    					title: 'Favorites'				
    			    },
    			    {
    					cls: 'tab-categories',
    			        iconCls: 'download',
    					items:  [test.Categories],
    					title: 'Categories'
    			    }
    			],
    			ui: 'dark',
    			tabBar: {
    				cls: 'bottombar',
                    dock: 'bottom',
                    layout: {
                        pack: 'center'
                    }
                }
            });
        },
    	onAboutButton:function() {
    		console.log("clicked on about button");
    	}
    };

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    I don't see where you're setting a handler for "onAboutButton". Are you just trying to add a button that does not flip a card?

  3. #3
    Sencha User
    Join Date
    Sep 2010
    Location
    Amsterdam
    Posts
    22
    Vote Rating
    2
    savelee is on a distinguished road

      0  

    Default


    no it's not the about button. but the settings button for where i was wondering.
    But I guess I found it.

    I should do it with a listener:
    Code:
    listeners : {
    		                activate : function(){ .. }
    }
    right?

Similar Threads

  1. a newbie question on "change" handler on a Ext.form.Field
    By flamant in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 14 Oct 2010, 5:13 AM
  2. Newbie - Top and bottom field borders missing in IE 7/8
    By smoothiegunner in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 17 Aug 2009, 1:21 AM
  3. Newbie- Summary in headline instead of bottom
    By davidguetta in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 4 Nov 2007, 12:27 PM

Thread Participants: 1

Tags for this Thread