Results 1 to 3 of 3

Thread: Navigation view, history and back button

  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    38
    Vote Rating
    2
      0  

    Default Unanswered: Navigation view, history and back button

    Hey there,

    I have quite big project to realise with Sencha Touch 2 for native packaging application, but I'm still wondering how to architect it.

    Let's take an example :

    I'm using a navigation view for my product category, here is the section :

    products-category-page -> products-yyy-page- -> detail-product

    So if I'm starting from the product-category page to reach the detail product page everything is ok and I can use the back button to go back to my first page, like this :

    products-category-page <- products-yyy-page- <- detail-product

    But let's imagine I'm jumping straight to the detail-product, I still want to display the previous button to go back to the product-yyy-page and so on :

    ???? <- detail-product

    Is there a way to face this situation?

    I was thinking about using the route but I'm not sure if it will work with native packaging application or if it's usefull in this situation ?

    Sorry for my bad English and thank you so much for your help

    Ocelyn

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    443
    Answers
    5
    Vote Rating
    18
      0  

    Default

    Routes will work fine with packaged applications, even though you won't see the URLs.

    My approach would be to create a route for each page, and have it do whatever operations are necessary to get you to the right view, regardless of where you're starting from. So the routing function that takes you to the product page should check whether the product page is already there, push it onto the navigation view it isn't, check whether the product detail page is already there, and pop it off the navigation view if it is.

    Then you can just call this.redirectTo(productURL) from wherever you are.

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    38
    Vote Rating
    2
      0  

    Default

    Hello jweber,

    Thanks for the information, I'm checking all of this!

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
  •