Select to view content in your preferred language

communication with multiple widgets

884
2
03-20-2014 06:34 PM
LefterisKoumis
Frequent Contributor
I have a widget (A) that needs to share data only with widgets B and widget B needs to shared data only with widget C.

A-->B--->C

They are all pre-loaded and in the widget A and B is the code addSharedData("xxxxx", arraycollection)...

In the B and C  widgets there is the line AppEvent.addListener(AppEvent.DATA_PUBLISH, sharedDataUpdated);

How do you specify that widget B will get the data only when they are sent from A, and widget C will listen from widget B only.

I hope it makes sense.

It seems it should be a way that there is AppEvent listener in B that is listening for a specific addSharedData like addShareData2 but I cannot find anything like this.

Thank you.
Tags (2)
0 Kudos
2 Replies
GISDev1
Deactivated User
Is there so many events going on that you can't check and see if it was the data that you wanted going to a specific widget when the event fires? Does that make sense? Even if the listener fires on the event, you can just check the contents and then determine which widget the data was intended for (within each listening widget), right?
0 Kudos
LefterisKoumis
Frequent Contributor
Yes, it makes sense.

I resolved my issue. It was my oversight when I realized that widget B was not pre-loaded as I though it was.

Thank you for your time.
0 Kudos