Hi Flex Coders, I have been taken over one project started by some other programmer, The project asks user to login and after user logs in , different custom MXML Components are loaded. Thats the bigger picture what the project needs to do. The way this project was organized that the developer created the login component , and other custom MXML Component and put them in different canvases and then put login in one ViewStack and the other MXML Componenets in another stack, By default on the load of the application, ViewStack with login Canvas is set to true and if user enter right password then the visibility of other stack having different custom components are set to true and login was set to false. The ToggleButtonBar was used whose data provider is second view stack having 3 other custom MXML component, and depending upon the button of the toggle bar selected the components are being loaded. All the viewstacks with the canvases are being loaded on the main app on the load of the application.
I am not sure thats the right way. In ideal world I like whenever user loads the page, only the login page will be loaded and once the correct credentials are entered, only the default MXML Component will be added with the ToggleButtonBar's default selection, I have to reorganize the structure of the project, I was thinking of adding and removing child depending upon the tab changed, Is there any better way to organize this project, Ideally I like to refresh the page while loading different MXML components on the tab selection so that we might get the component totally in synchronization with the server, Anyone has nice and better way of organizing Project without setting the visibility true and false and also fulfilling my requirement. Any Help and guidance will be appreciated Thanks Anuj

