This content has been marked as final. Show 4 replies
"Does anyone have any suggestions in general on how to handle this
"login, logout, [need to reinitialize the whole app.], login" cycle?"
I had what I think is a similar situation. I have a text area pop up
form that is repeatedly used in my application to add comments to
multiple records. In my first attempt, the popup would contain the data
entered in a previous record when accessed for a subsequent record.
I resolved this by placing a "new MyCustomPopUp()" call in an
appropriate place in my application. I would imagine a similar concept
would work for you. Reinitialize the component(s) at an appropriate
place in your login-logout logic flow.
A quick and "dirty" solution to this is to use navigateToUrl to simply call the Flex apps html wrapper again. It ensures that EVERYTHING is initialized. Since the swf will be cached, performance should be ok, unless you have VERY heavy initial data loading.
It feels kinda "hacky", but the choice is a lot of code to restore things to their initial condition.
The way I have is following : securitymanager A/S class that handles user Login and Logout and fires App specific USER_LOGED_IN USER_LOGED_OUT events .then all components interested in those events regisiter their listeners with securityManager and when events fire they reset themselves accordingly.
so for data grids etc All I have to to do is fetch or (re_fetch if needed ) date on login event and Clear it on log-out.
Thanks to all the responders. For now I've gone with Tracy's option of reloading the base URL if the user wants to log in.