Select to view content in your preferred language

Flex Mobile Navigation

652
2
12-12-2011 08:25 AM
CaseyBentz
Frequent Contributor
I have basic question regarding how to easily manage application navigation in a mobile application. My specific question is what to do when the user clicks the back button?

My application has 3 views.  My default view is a map that on the map load event, goes out and queries a map service and displays the points on the map.  When the user clicks on a point it takes them to the detailed information about the point.  The user then clicks the back button and the entire process fires off again, the map has to reload and the query is ran again and I have to process the query again.  I figure I can hack this to not fire off the query, but what do I do to not make the map reload? 

I also have a search screen that has 3 types of searches using a button bar to control which search state is visible.  The user can search for a feature, go to the details, click the back button and the entire search view sets back to the default state.  How can I make it so it just goes back to where it was without resetting the state?

I have to assume that there is some functionality that I do not know about that would prevent all this sort of stuff.  Has anyone else ran into these issues?  I assume I am not alone in this situaiton.

I have used the sample WebMap application and it behaves the same as mine does, where you can click on a web map, then click back and it takes you back to the top of the list rather than remember where you were in the list.
Tags (2)
0 Kudos
2 Replies
AaronNash
Deactivated User
add destructionPolicy="never" in the view component and it should cache the view and not destroy it
0 Kudos
CaseyBentz
Frequent Contributor
Thank you.  That is exactly what I am looking for.  It worked perfectly.
0 Kudos