I am using a simple TabbedViewNavigatorApplication with ViewNavigator views inside it. I had 3 views, 'A', 'B' and 'C'. I make some drop down selections in view 'A' and go to next screen which shows report details. But when I go back from report details screen to view 'A', all my previous selections are lost. It shows default screen as it was when I launched the application.
On launch, I select timeperiod value as 'b':
when i click 'ok', i go to 'report details' screen:
When i click 'back' here, it goes to previous screen but all my previous selections are gone!! :
Can you kindly let me know if there is a way to retain all my previous selections? This behaviour looked very strange to me though. It must have behaved in same way as TabNavigator in web behaves, where in it retains all the screen data in each of the tabs, no matter how we navigate.
Appreciate your help...
This blog post might be useful: http://flexponential.com/2010/12/05/saving-scroll-position-between-vie ws-in-a-mobile-flex-application/
I came across a property called destructionPolicy, for View. It can take either 'auto' or 'never' as it's value. By default it's set to 'auto'
"destructionPolicy - Defines the destruction policy the view's navigator should use when this view is removed. If set to "auto", the navigator will destroy the view when it isn't active. If set to "never", the view will be cached in memory."
I set it's value to 'never' and all my dropdown values are saved and is persistent throughout!! Hope this helps someone....