Results 1 to 2 of 2

Thread: How to bind to tab title in modern toolkit?

  1. #1
    Sencha User
    Join Date
    Aug 2014
    Location
    Japan
    Posts
    22
    Answers
    1

    Default How to bind to tab title in modern toolkit?

    Hi,

    I tried to bint to tab title.
    In classic toolkit, it works this:
    Code:
            {
                bind: {
                    title: '{mainTabTitle}'
                },
                iconCls: 'fa-home',
                items: [{
                    xtype: 'mainlist'
                }]
            }
    But, not works in modern:
    Code:
            {
                bind: {
                    title: '{mainTabTitle}'
                },
                iconCls: 'x-fa fa-home',
                layout: 'fit',
                items: [{
                    xtype: 'mainlist'
                }]
            }
    Code:
    Uncaught Error: Cannot bind title on Ext.Container - missing a setTitle method.
    I tried these:
    Code:
                bind: {
                    tab: {
                        title: '{mainTabTitle}'
                    }
                },
    Code:
                bind: {
                    tab: {
                        title: '{mainTabTitle}'
                    },
                    deep: true
                },
    Code:
                tab: {
                    bind: {
                        title: '{mainTabTitle}'
                    }
                },
    But not works.

    Can I bind to tab title?

  2. #2
    Sencha User
    Join Date
    Aug 2014
    Location
    Japan
    Posts
    22
    Answers
    1

    Default

    I could have resolved it myself!

    Code:
            {
                tab: {
                    viewModel: 'main',
                    bind: {
                        title: '{mainTabTitle}'
                    }
                },
                iconCls: 'fa-home',
                items: [{
                    xtype: 'mainlist'
                }]
            }
    Is this the right way?

Similar Threads

  1. Grid in Modern toolkit
    By aruti in forum Ext JS 6.x Q&A
    Replies: 4
    Last Post: 5 Aug 2016, 10:45 AM
  2. Modern toolkit
    By ErikJAX in forum Sencha Architect 3.x: Q&A
    Replies: 1
    Last Post: 3 May 2016, 1:44 PM
  3. Tree in Modern toolkit
    By wbabich in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 13 Oct 2015, 6:35 AM
  4. Draw with modern toolkit
    By rocco.celsi in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 9 Aug 2015, 2:17 PM
  5. What's coming soon in the Modern toolkit?
    By wbabich in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 3 Aug 2015, 5:50 AM

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
  •