You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by bh...@apache.org on 2011/03/31 12:35:54 UTC
svn commit: r1087239 - /shindig/trunk/content/container/sample-pubsub.html
Author: bhofmann
Date: Thu Mar 31 10:35:54 2011
New Revision: 1087239
URL: http://svn.apache.org/viewvc?rev=1087239&view=rev
Log:
changed pubsub sample to use correct shindig.container methods to retrieve specUrl based on the gadget's moduleId
Modified:
shindig/trunk/content/container/sample-pubsub.html
Modified: shindig/trunk/content/container/sample-pubsub.html
URL: http://svn.apache.org/viewvc/shindig/trunk/content/container/sample-pubsub.html?rev=1087239&r1=1087238&r2=1087239&view=diff
==============================================================================
--- shindig/trunk/content/container/sample-pubsub.html (original)
+++ shindig/trunk/content/container/sample-pubsub.html Thu Mar 31 10:35:54 2011
@@ -45,7 +45,9 @@ my.LayoutManager.prototype.getGadgetChro
my.init = function() {
gadgets.pubsubrouter.init(function(id) {
- return my.gadgetSpecUrls[parseInt(id[id.length - 1])];
+ var gadgetId = shindig.container.gadgetService.getGadgetIdFromModuleId(id);
+ var gadget = shindig.container.getGadget(gadgetId);
+ return gadget.specUrl;
}, {
onSubscribe: function(sender, channel) {
log(sender + " subscribes to channel '" + channel + "'");