You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2013/03/25 23:08:43 UTC

svn commit: r1460915 - /rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js

Author: mfranklin
Date: Mon Mar 25 22:08:43 2013
New Revision: 1460915

URL: http://svn.apache.org/r1460915
Log:
Added required initialization parameters back into hub RAVE-920

Modified:
    rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js

Modified: rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js?rev=1460915&r1=1460914&r2=1460915&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js Mon Mar 25 22:08:43 2013
@@ -129,7 +129,20 @@ rave = (function () {
                 throw new Error("No implementation of OpenAjax found.  " +
                     "Please ensure that an implementation has been included in the page.");
             }
-            openAjaxHub = new OpenAjax.hub.ManagedHub();
+            openAjaxHub = new OpenAjax.hub.ManagedHub({
+                    onSubscribe:function (topic, container) {
+                        rave.log((container == null ? "Container" : container.getClientID()) + " subscribes to this topic '" + topic + "'");
+                        return true;
+                    },
+                    onUnsubscribe:function (topic, container) {
+                        rave.log((container == null ? "Container" : container.getClientID()) + " unsubscribes from this topic '" + topic + "'");
+                        return true;
+                    },
+                    onPublish:function (topic, data, pcont, scont) {
+                        rave.log((pcont == null ? "Container" : pcont.getClientID()) + " publishes '" + data + "' to topic '" + topic + "' subscribed by " + (scont == null ? "Container" : scont.getClientID()));
+                        return true;
+                    }
+            });
         }
         return openAjaxHub;
     }