[flexcoders] Cairngorm Update Problem
I am working on a Cairngorm project. I am using a ViewStack component to flip the user interface between a graph component and a filter data component both in the view layer. The basic concept of the application is to have a line graph and allow the users to filter the data using an input screen. All of this works the first time the user enters the application and uses the filter option. The problem I am having is the second or third time the user enters the filter screen. I cannot find a way to tell the graph component to reset itself after the event is dispatch and the controller takes over and new data needs to be displayed in the graph. (IE remove any annotationElements that were on the old graph) Is there a way to notify the component in the view layer of a Cairngorm project from the command layer when the results are return from the delegate? Thanks, ~Chris
RE: [flexcoders] Cairngorm Update Problem
You could put a property on the model that the component can bind to, that way the command could just update the model after the delegate returns and databinding will take care of the rest for you. I personally don't like keeping state properties like that in my model, so I usually use Cairngorm Extensions. You should check out their Callbacks model -- it solves your exact problem and is the functionality that turned me on to it. If you are already too far along in your project to switch to extensions, I'd go with the first option for the quick fix. http://umcairngorm.riaforge.org/ http://code.google.com/p/flexcairngorm/ HTH, Ryan From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of c_higgon Sent: Wednesday, September 24, 2008 3:45 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm Update Problem I am working on a Cairngorm project. I am using a ViewStack component to flip the user interface between a graph component and a filter data component both in the view layer. The basic concept of the application is to have a line graph and allow the users to filter the data using an input screen. All of this works the first time the user enters the application and uses the filter option. The problem I am having is the second or third time the user enters the filter screen. I cannot find a way to tell the graph component to reset itself after the event is dispatch and the controller takes over and new data needs to be displayed in the graph. (IE remove any annotationElements that were on the old graph) Is there a way to notify the component in the view layer of a Cairngorm project from the command layer when the results are return from the delegate? Thanks, ~Chris This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
Re: [flexcoders] Cairngorm Update Problem
Either you need to call the ViewStack.callLater(FunctionName) Thanks, with Regards, Jitendra Jain - Original Message From: c_higgon [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, 25 September, 2008 4:15:10 AM Subject: [flexcoders] Cairngorm Update Problem I am working on a Cairngorm project. I am using a ViewStack component to flip the user interface between a graph component and a filter data component both in the view layer. The basic concept of the application is to have a line graph and allow the users to filter the data using an input screen. All of this works the first time the user enters the application and uses the filter option. The problem I am having is the second or third time the user enters the filter screen. I cannot find a way to tell the graph component to reset itself after the event is dispatch and the controller takes over and new data needs to be displayed in the graph. (IE remove any annotationElements that were on the old graph) Is there a way to notify the component in the view layer of a Cairngorm project from the command layer when the results are return from the delegate? Thanks, ~Chris Be the first one to try the new Messenger 9 Beta! Go to http://in.messenger.yahoo.com/win/