3 Replies Latest reply on Nov 28, 2007 9:31 AM by ntsiii

    reset components settings

      Hi, i have a question.
      Sorry for my english. I don't speak the language very well.
      I'm new in Flex tecnology, and i want to know how reset a component. I have a login state, after login a change state and i have a List with data loaded from an'xml. when I do a logout, a clear all the variables and turn-back to login state, but when I do the login again, the selected index of the list remain, and the effects (a move effect, for example), is not reinitialized, and the position of the panel than the effect move, is non in the default position. There is a way to reinitialize all properties when I do a logout?

        • 1. Re: reset components settings
          ntsiii Level 3
          There is no built-in functionality to return all members/components to their initial state.

          One easy and certain way to do this is to have the logout functionality call navigateToURL, using Application.application.url, and target "_self".

          This causes the entire application to be reloaded, therefore initialized. It will reload from the local cache, so performance will be reasonable.

          Your English is perfectly understandable.

          • 2. Re: reset components settings
            SourceBay Level 1

            Your English is perfectly understandable.

            Thanks Tracy.
            Forcing a reload... it's a good idea, when i call Logout function, i delete the user-local flash cookie and reload the page.

            It's not the best logic for an Application, but it's a way. There aren't Application methods to reinitialize?. Sin.
            Thanks a lot for your advice!
            • 3. Re: reset components settings
              ntsiii Level 3
              "...Application methods to reinitialize..." No, there are none.