I have an application written using Cairngorm. One of my decisions was to use ViewHelpers, as a way to organize code into classes that support the mxml view (without using ViewLocator in other parts of my code, i.e. Commands). I'm facing the following problem :
My application is secured by login to external server. After successful login it changes its state and display the actual interface. Now there is also logout option. What I'm trying to achieve is basically "reset" everything in my application, to allow use to log in once again, pull the data once again, clear all the views. This however turned out to be a problem. I can clear my model, I can send my main application state to the default one, but this does not help, really. It seems that my other views, still have the old references to the model, and thus displaying old values. Now when new user logs in, he sees what the previous user has been doing. I suspect that those ViewHelpers are part of the problem. Here is a snippet of one of my views (application has few of those) : public class VEmployeeDashboardHelper extends ViewHelper { [Bindable] public var model:ProjectDashboardModelLocator = ProjectDashboardModelLocator.getInstance(); (...various methods...) } So the model instance is taken here, once. Now when I clear the instance in ModelLocator (instance, not just the reference), this reference here does not reflect this. It still holds the data (copied?). Now at this point I'm not even sure which behavior is correct. If the model changes, will such code construction work, so that the model change is reflected in my view? (the mxml components are binding to the model variable). Note that simple HTTP reload of application is not an option, since this app will be released as desktop AIR app as well. Using latest Flex Builder/Flash Player/nightly Flex 3 SDK (from yesterday, actually, so even newer than this one with Flex Builder. Sebastian Zarzycki <[EMAIL PROTECTED]>