[ 
http://jira.amdatu.org/jira/browse/AMDATU-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10237#comment-10237
 ] 

Naftali van der Loon commented on AMDATU-160:
---------------------------------------------

if we do this in the my.init() in dashboard.js: 
        gadgets.pubsub2router.init(
                    { 
                      onSubscribe: function(topic, container) {
                        log(container.getClientID() + " subscribes to topic '" 
+ topic + "'");
                        return true;
                        // return false to reject the request.
                      },
                      onUnsubscribe: function(topic, container) {
                        log(container.getClientID() + " unsubscribes from topic 
'" + topic + "'");
                      },
                      onPublish: function(topic, data, pcont, scont) {
                         log(pcont.getClientID() + " publishes '" + data + "' 
to topic '" + topic + "' subscribed by " + scont.getClientID());
                        return true;
                        // return false to reject the request.
                      }
                    });
A pubsubrouter is initialized, but this seems to happen AFTER de gadgets are 
loaded, therefore the pubsub2router is not initialized and gadgets cannot 
subscribe to it

> While loading a gadget, the pubsub2router (Shindig 2.0) is not initialized
> --------------------------------------------------------------------------
>
>                 Key: AMDATU-160
>                 URL: http://jira.amdatu.org/jira/browse/AMDATU-160
>             Project: Amdatu
>          Issue Type: Bug
>          Components: Application - Dashboard
>    Affects Versions: 0.0.6
>            Reporter: Naftali van der Loon
>            Assignee: Ivo Ladage - van Doorn
>
> While loading a gadget, the pubsub2router (Shindig 2.0) is not initialized, 
> therefore a gadget cannot subscribe to the pubsub2router.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to