Select to view content in your preferred language

Flex Viewer 2.0 Data Messaging Bug

372
0
07-04-2010 12:26 PM
RobertScheitlin__GISP
MVP Emeritus
Flex Viewer 2.0 team,

There is a bug in the Data Messaging for the widgets. Basically the BaseWidget's addSharedData function looks like this
public function addSharedData(key:String, arrayCollection:ArrayCollection):void
    {
        var data:Object =
            {
                key: key,
                collection: arrayCollection
            }
        ViewerContainer.dispatchEvent(new AppEvent(AppEvent.DATA_PUBLISH, data));
    }

and the DataManager.as is looking for this
private function addData(event:AppEvent):void
    {
        var key:String = event.data.key;
        if (key != "")
        {
            var dataCollection:Object = event.data.data;
            if (dataTable.containsKey(key))
            {
                dataTable.remove(key);
            }
            dataTable.add(key, dataCollection);

            var data:Object =
                {
                    key: key,
                    data: dataTable
                };
            ViewerContainer.dispatchEvent(new AppEvent(AppEvent.DATA_NEW_PUBLISHED, data));
        }
    }
Tags (2)
0 Kudos
0 Replies