1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    India
    Posts
    49
    Vote Rating
    0
    Shafnas is on a distinguished road

      0  

    Default Answered: Need to load view(onclicking a button) inside a tab of tabpanel -Sencha 2 mvc

    Answered: Need to load view(onclicking a button) inside a tab of tabpanel -Sencha 2 mvc


    How can we switch/load views with in a Tab inside a tabpanel..
    I have a Tabpanel and in the first Tab, I have a list, which contains a button/itemdisclosure button.
    If I click this button,I want to load a view with its details..

    What shall I do? Iam using sencha 2 mvc. Pleas someone help me..Please...

  2. this.up('container') may work.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Answers
    3549
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The tab should use card layout. The first item is the list, the second be the detail view. Then you can use setActiveItem on the tap to switch from the list to the detail.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Location
    India
    Posts
    49
    Vote Rating
    0
    Shafnas is on a distinguished road

      0  

    Default


    CAn you please tell me how to use setaciveitem? when i use, Ext.Viewport.setActiveItem(1); Iam loading an entirely new view?not inside the tab view....

  5. #4
    Sencha User
    Join Date
    Feb 2012
    Location
    India
    Posts
    49
    Vote Rating
    0
    Shafnas is on a distinguished road

      0  

    Default


    Iam using code like this

    xtype: 'tabpanel',
    baseCls:'tabheader',
    cls:'tab_container',
    scrollable:true,
    tabBarPosition: 'top',
    flex:1,
    items: [
    {
    xtype:'container',
    title:'Sample',
    id:'Sample',
    layout:'card',
    cardSwitchAnimation: 'slide',
    tabBarPosition: 'top',
    items:[
    {
    title: 'Sample',
    xtype: 'list',
    flex:1,
    store: 'SampleWithoutAgentOffers',
    itemTpl: '{name}' ,
    onItemDisclosure: function(record, btn, index) {
    Ext.Viewport.setActiveItem(1);
    },
    {
    xtype:'panel',
    html:'hiiii'
    }
    ]
    }}

    Please help to solve this ...

  6. #5
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Answers
    3549
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You need to get the container not use the Ext.Viewport.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  7. #6
    Sencha User
    Join Date
    Feb 2012
    Location
    India
    Posts
    49
    Vote Rating
    0
    Shafnas is on a distinguished road

      0  

    Default


    Please please provide me the code, as Iam new, I will be stuck again, Please help me sort this out

  8. #7
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Answers
    3549
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    this.up('container') may work.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  9. #8
    Sencha User
    Join Date
    Feb 2012
    Location
    India
    Posts
    49
    Vote Rating
    0
    Shafnas is on a distinguished road

      0  

    Default


    I used this.up('#idofcontainer').setActiveItem(1); This worked..Thanks Mitchell ...

Thread Participants: 1

Tags for this Thread