Search code examples
navigationsencha-touch-2back

How to determine oldview/newview on back event of navigation view in sencha touch 2


When the back event fires in a ST2 navigationview how do you determine which view is being navigated away from and which view we're navigating to?


Solution

  • So I found another work around for this. I needed to know the old and new views for navigation so that I could change some filters applied to a data store. Here's what I did, on the view that is returning back I added the following code:

    listeners: {
        deactivate: function() {
            ... do some stuff ...
        }
    }
    

    Although not a solution to the original problem, this works well for me.