Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6575597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:24:23+00:00 2026-05-25T15:24:23+00:00

How do I fire an event when a tab is loaded in Sencha Touch?

  • 0

How do I fire an event when a tab is loaded in Sencha Touch? I want to AJAX in some content that isn’t important enough to be loaded immediately, and Sencha Touch seems to miss the autoLoad property of ExtJS.

What can I bind to on a panel to detect that the panel has been activated?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T15:24:24+00:00Added an answer on May 25, 2026 at 3:24 pm

    You can listen for the event activate in the panel itself or for the event cardswitch in the TabPanel.
    The cardswitch event only fires after the first card has been set, so if you want an action to trigger on initialization, add a listener for the activate event on the TabPanel.

    Ext.setup({
        icon: 'icon.png',
        tabletStartupScreen: 'tablet_startup.png',
        phoneStartupScreen: 'phone_startup.png',
        glossOnIcon: false,
        onReady: function() {
            var tabpanel = new Ext.TabPanel({
                tabBar: {
                    dock: 'bottom',
                    layout: {
                        pack: 'center'
                    }
                },
                fullscreen: true,
                ui: 'light',
                cardSwitchAnimation: {
                    type: 'slide',
                    cover: true
                },
    
                //
                // Listen for cardswitch event in TabPanel
                //
                listeners: {
                    cardswitch: function(comp, newCard, oldCard, index, animated) {
                        console.log(newCard.title, oldCard.title, index, animated);               
                    }
                },
    
                defaults: {
                    scroll: 'vertical'
                },
                items: [{
                    title: 'About',
                    html: '<h1>Bottom Tabs</h1><p>Docking tabs to the bottom will automatically change their style. The tabs below are type="light", though the standard type is dark. Badges (like the 4 &amp; Long title below) can be added by setting <code>badgeText</code> when creating a tab/card or by using <code>setBadge()</code> on the tab later.</p>',
                    iconCls: 'info',
                    cls: 'card1',
                    //
                    // Listen for activate event in panel
                    //
                    listeners: {
                        activate: function(comp){
                            console.log(comp.title);
                            //
                            // Ajax Request
                            //
                            Ext.Ajax.request({
                                url: 'your_url_here.json',
                                success: function(response, opts) {
                                    //
                                    // Update panel html with ajax response
                                    //
                                    comp.update(response.responseText);
                                },
                                failure: function(response, opts) {
                                    console.log('server-side failure with status code ' + response.status);
                                } 
                            });
                        }
                    }
                }, {
                    title: 'Favorites',
                    html: '<h1>Favorites Card</h1>',
                    iconCls: 'favorites',
                    cls: 'card2',
                    badgeText: '4'
                }, {
                    title: 'Downloads',
                    id: 'tab3',
                    html: '<h1>Downloads Card</h1>',
                    badgeText: 'Text can go here too, but it will be cut off if it is too long.',
                    cls: 'card3',
                    iconCls: 'download'
                }, {
                    title: 'Settings',
                    html: '<h1>Settings Card</h1>',
                    cls: 'card4',
                    iconCls: 'settings'
                }, {
                    title: 'User',
                    html: '<h1>User Card</h1>',
                    cls: 'card5',
                    iconCls: 'user'
                }]
            });
        }
    });
    

    More info on the Sencha Touch Docs:
    http://dev.sencha.com/deploy/touch/docs/?class=Ext.TabPanel
    http://dev.sencha.com/deploy/touch/docs/?class=Ext.Panel

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to fire an event when a new tab is created in Chrome.
I want to fire an event when the last remaining tab or window is
i want to fire an event manually using c#. For instance, say if i
It is not possible to fire an event in C# that has no handlers
I want to let TextBox control TextChanged event fire only when there are more
Does anyone know how to fire an event when I change from one tab
I'm interested in using fcbkcomplete , which has: onselect – fire event on item
i need to fire an event (or start a workflow) when the permissions of
I need to fire an event when the mouse is above a PictureBox with
How to fire an event when an ancestor of an element is removed or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.