1. #1
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    162
    Answers
    7
    Vote Rating
    2
    UbuntuPenguin is on a distinguished road

      0  

    Default Unanswered: Viewstack and history navigation

    Unanswered: Viewstack and history navigation


    Hello Everyone,
    Okay, here is my use case. Assume we have two menuitems in the navigation panel A and B. When the user clicks on either A or B, they have a 'stack progression' consisting of other panels ( A1 , A2 , A3 ) , (B1 -> B2 -> B3). A more concrete example is where the user clicks on A and is taken to view A1 which is a list. They select an item in A1 and is taken to another list A2 and after selecting something in A2 they are taken to an inspection/view/more info panel A3.

    A
    A1->A2-A3
    B
    B1->B2->B3.

    Now that the base has been set here is my problem. Let's say the user clicks A in the menu. Selects an item in list A1. So the current view up on the A stack is A2. Then the user clicks B in the menu, now they have B1 up as their current view. The user then clicks A and should return to view A2.

    My question is how two parts, what is a recommended way of storing that if menu A is clicked, the the route that should be redirected to is A2 and not A1. And also what happens to the back button ? Since both A and B work as viewstacks if the user goes A1->A2->B2 and clicks the back button, the expected behavior is to go to B1, but the back button will just take them to A2. Mind you, the viewstacks don't actually exists as I am creating the single views dynamically and using routes to guide my navigation.

    Any help is greatly appreciated. And if I botched the explanation don't hesitate to ask for more information.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,227
    Answers
    3523
    Vote Rating
    859
    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


    If the user tapps on B then you should insert B1 and B2 at index 0 and remove A1 and A2
    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.

Thread Participants: 1

Tags for this Thread