views:

152

answers:

2

Hello, I am trying to raise an event to all of the widgets that catch it.
I have an authentication widget and other widgets that depeand on the fact that the user is logged in.
I would like to raise an event to all of those widgets when a user is logged in without connecting them manually.
How can it be done?

Thanks in advnace,
Omer.

+2  A: 

Try dojo.publish and dojo.subscribe

Perhaps this is a better link

peller
Could you show me an example of how such a thing would work?
the_drow
+1  A: 
dojo.subscribe("mytopic",console,"debug");
dojo.publish("mytopic",["whatever"]);
Joscha