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 7747819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:37:27+00:00 2026-06-01T10:37:27+00:00

I am working with Sencha Touch 2 and I need to create a TitleBar

  • 0

I am working with Sencha Touch 2 and I need to create a TitleBar which is sucked into a set of screens. The TitleBar elements are drop-down lists. The items within the drop-down lists must be dynamic and must be loaded from a data file.

I’ve managed to load the data but I cannot pass the data back to the TitleBar. In other words, I need somehow to create a reference to the titlebar.

Code:

Ext.define('CustomerToolbar', {
extend: 'Ext.TitleBar',


xtype: 'customer-toolbar',


initialize: function() {
    this.callParent(arguments);

    this.loadItems();




    console.info("end of init");       
},


config: {
    layout: 'hbox',


    defaults: {


    }
},


loadItems: function (titleBar) {
    var itemList = [];
    var itemOptionList = [];


    Ext.getStore('OrganizationStore').load(function(organizationList) {


        console.info("getOptionList inside the store load function");


        Ext.each(organizationList, function(organization) {


            console.info("organizations: " + organization.get("name") + "," + organization.get("id"));
            itemOptionList.push({text: organization.get("name"), value: organization.get("id")});


        });


        console.info("itemList - about to populate");
        itemList.push(
            {
                xtype: 'selectfield',
                name: 'customerOptions',
                id :'organizationId',
                options: itemOptionList,
                action :'selectOrganizationAction'
            }
        );
        console.info("itemList - populated");
        console.info("itemList within the store block: " + itemList);


        console.info("this: " + this);


       //THIS IS WHERE I AM HAVING THE PROBLEM. 
       //The variable this points to the store and not to the TitleBar
       //this.setItems(itemList);


    });


    console.info("itemList outside the store block: " + itemList);
}

});

  • 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-06-01T10:37:28+00:00Added an answer on June 1, 2026 at 10:37 am

    You can add a listener to your selectfield and do

    listeners:{
                change:function(){
                    title = Ext.getCmp('organizationId').getValue();
                    Ext.getCmp('TitlBarID').setTitle(title);
                }
            }
    

    I know Ext.getCmp is not fashionable but it works

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

Sidebar

Related Questions

I'm just working on a web application with sencha touch. I need to implement
I am trying to learn Sencha Touch and am working on an app which
I'm quite new to sencha touch. The goal is to create an app which
I am working on a Sencha Touch application and I am learning it great
I am working with this example to try and learn Sencha Touch. I have
I am trying to create a form through sencha touch that simply takes the
I am working on a mobile application and using sencha touch charts. By default
Im working with Sencha touch and I am trying to update a panel after
I'll begin with the usual disclaimer: new to Sencha Touch/working with JSON, floundering in
In Sencha Touch, I often need to have an Ext.DataView panel that contains a

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.