Results 1 to 2 of 2

Thread: Setting Title when using ref

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Vote Rating

    Default Setting Title when using ref

    I have a navigation view, in which go a search, search summary and detail panels/cards.

    I find I can use the 'ref' feature in Architect to set up references to containers which I later 'push()' into this app. But I find if I use 'ref' ( auto-create) I cannot find a way to set the title. The only way I seem able to set the title is not to use 'ref' and instead code it as per the below:

    var results = Ext.create('LyricsTo.view.SearchResults', {
    title: 'Search Results'

    Am I missing something here, or is this ok? Just want to be sure I'm grasping the right way to do MVC in Sencha Touch 2.


  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    refs aren't an Architect feature, it's a feature of Sencha Touch 2 (and Ext JS 4) MVC. All it is a way to hold a reference to a component. So if you set it to a string it will attempt to look it up using ComponentQuery. Set it to an object it will try to resolve it based on the selector config and if it doesn't find a reference and autoCreate is set to true, it will attempt to create it using the xtype config.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

Posting Permissions

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