Hi List,

I'm developing an application with custom components and custom Value Objects in combination with the Cairngorm Framework.

It is a reporting application and the idea is to have a central TableVO which contains the report data and several UI elements like a Datagrid and several charts are attached to the TableVO. The TableVO object resides in a Cairngorm Model Locator object and is [Bindable].

A snippet of my TableVO object:
   public class TableVO extends EventDispatcher
   {
public static var CHANGE_EVENT_NAME:String = "tableVoChange";
       private var __columns:XAxisVO;
private var __mapTableContent:ArrayCollection; private var __chartValues:ArrayCollection; public function TableVO(){
           super();
} [Bindable] public function get columns():XAxisVO{
           return __columns;
       }
public function set columns( arg:XAxisVO ):void{
           __chartValues = null;
           __columns = arg;
           dispatchEvent(new Event(Event.CHANGE));
       }
public function set mapTableContent( arg:ArrayCollection ):void{
           __chartValues = null;
           __mapTableContent = arg;
           dispatchEvent(new Event(Event.CHANGE));
       }
[Bindable]
       public function get mapTableContent():ArrayCollection{
           return __mapTableContent;
       }
....
}

The Datagrid and the charts are custom components which extend the Flex Datagrid and Chart components.

My application runs fine but I have problems with filter-functions. The filter function affect the property mapTableContent in TableVO and I'd like to see the filter effect directly in my custom components.

This works fine in the Datagrid component but the chart components seem to be not aware of changes in TableVO.mapTableContent, nothing changes.

I tried to find a hint in the documentation but I wasn't able to find the reason why my code doesn't work.

What I would like to have:

   * a filter function is applied to TableVO.mapTableContent
   * my custom chart component gets aware of changes in
     TableVO.mapTableContent and executes a method for redrawing the chart


Any hint is appreciated.

Regards,
Christoph

Reply via email to