Select to view content in your preferred language

sharing data between widgets (using fetchSharedData)

3089
1
11-02-2010 11:11 AM
MOHANA_KRISHNAPUNNAM
New Contributor II
Hi,

I am working on FlexViewer 2.x. I am using addSharedData to add the data into Datamanager.

It didn't work for me when I am trying to get the data in other widget using fetchShareddata();

In Datamanager.as file I found a function for adding the data. I changed event.data.data to event.data.collection (Line 73). It worked fine for me.

Is it a  bug in the flexViewer?

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));
        }
    }


Thank you,

Mohan
Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus
Mohan,

   Yep it is a bug that I reported back in beta that has yet to be fixed. No big deal though because the only ones using this capability are programmers that can easily fix it themselves.
0 Kudos