1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    5
    Vote Rating
    0
    laxmir is on a distinguished road

      0  

    Default Unanswered: How to refresh a tab panel

    Unanswered: How to refresh a tab panel


    I have a requirement to refresh the currently shown panel when user comes back to that panel on subsequent times.

    I have tree panel on left side and upon selecting nodes i have different panels for each of the node to display on the right hand side.

    Below is the scenario where in i need to refresh the tab panel.

    1. On the tree panel i clicked the node and on the right hand side a tabbed panel is displayed which has 6 six tabs. I selected the third tab which has two grids in it (one on top and second one on bottom)
    2. I clicked on a different node on tree panel and right hand panel is refreshed with new panel which has a form.
    3. Now i filled the content in that form and submitted the contents to back-end. This will insert data to the table.
    4. Now i clicked on the previous node (same node in tree panel as in step 1) and tabbed panel is displayed with 3rd tab as selected tab. This tab is displayed in the same state as i first left before clicking a node on tree panel. When the tabbed panel is displayed, i want to reload both the grids in that tab as in previous steps, a new data is inserted.

    I try to listen for 'render', 'activate' and 'show' events on tab panel and reloading the store which the grids rely on. But some how none of them were triggered when i select the node second time and tabbed panel is displayed.

    I'm using ExtJS 4.0.7.

    I'm unable to post the code as it's very huge. If someone can help me finding a solution, it will be great.

    Thanks !!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,604
    Answers
    3450
    Vote Rating
    818
    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 child items of the tab panel will fire the activate method not the tab panel itself.
    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.

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    5
    Vote Rating
    0
    laxmir is on a distinguished road

      0  

    Default


    Thanks for the response.

    I managed to solve the issue with the following solution.

    When the form is updated and new record is inserted into DB successfully, in UI i'm setting isDirty flag to TRUE and when the user click on previous node on the tree panel, i'm handling 'select' event and then checking is flag = TRUE and the currently active tab is what i'm interested in, then i'm refreshing the panel of that tab.

    It took quite a while to figure out the solution. Thought it may be helpful to somebody.

Thread Participants: 1