1 Reply Latest reply on Dec 6, 2007 6:22 PM by ntsiii

    View States

    Mike_Konopka
      I'm building a typical application with Login, Create Profile and then the main app screens.
      I thought that I would use view states to swap between the different screens but , it seems that RemoveChild does not destroy the component it only hides it so that when AddChild is called the component is re-displayed (and any data left in input fields is still there).

      I'm sure that I can write something to clear the data in the fields but it would be much easier to have the component destroyed and re-created when it needs to be displayed. This has advantages of ensuring that all member variables are reset to a clean state so there is less to worry about when user A logs out but doesn't close the browser or app then user B logs in right after.

      I'm used to programming plain old web applications with Java so it's possible I'm not thinking about this problem correctly for Flex terms.

      Thanks in advance for any advice.

        • 1. Re: View States
          ntsiii Level 3
          For complex views, you will find ViewStack much easier and more intuitive to code.

          But that won't solve your problem. The best solution to this is to simply reload the application using navigateToUrl().

          Tracy

          Tracy