This content has been marked as final. Show 4 replies
I googled it alot but I did not find solution for this. There was some discussion on displayObject loaderInfo to get first a loader info and get its loader and call unload() method to unload the data.
No clue whats going on behind the scene in flex. On some pages, I have grid rows which are dynamically added in the pages when user click + button and gets removed when user clicks - button.
Now if on some page, I add few grid rows and then simply go to some other page. When I come back to my first page, all my previous grid rows are still in the mxml page.
Please provide some pointer on this.
Thanks and Regards,
You're thinking like a web developer where moving from page to page
is a server trip and a refresh of the page. Your components that you make visible in your view stack are created once and sitting in memory (on the client). So when you go backthe page will aways appear like you left it.
So you must add an initialization type function to your components to set things
the way you want them before you show the page.
add a mx:Script tag and add a public method that does what ever
updates as you require.
You could also put the form in a pop-up window. When the window is destroyed (i.e. in your "submit") handler the data is discarded.
The next time you call the function to open the form window, the form will be blank (unless you create code to save & redisplay the entries yourself).
Thank you so much for giving your time and looking it. Well I thought that there will be some enbuilt fucntion in flex might unload all the data from the mxml page. Anyway I will write code which will initialize my each mxml page when user visit next time.