shindig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wood...@apache.org
Subject svn commit: r1146841 - /shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js
Date Thu, 14 Jul 2011 18:44:43 GMT
Author: woodser
Date: Thu Jul 14 18:44:43 2011
New Revision: 1146841

URL: http://svn.apache.org/viewvc?rev=1146841&view=rev
Log:
Committing Matt's patch to add back container inline client for pubsub2 to CommonContainer:
https://reviews.apache.org/r/1104/

Modified:
    shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js

Modified: shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js?rev=1146841&r1=1146840&r2=1146841&view=diff
==============================================================================
--- shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js (original)
+++ shindig/trunk/content/samplecontainer/examples/commoncontainer/assembler.js Thu Jul 14
18:44:43 2011
@@ -54,9 +54,29 @@ CommonContainer.init = function() {
   gadgets.pubsub2router.init({
     hub: CommonContainer.managedHub
   });
+
+  try {
+
+    // Connect to the ManagedHub
+    CommonContainer.inlineClient =
+      new OpenAjax.hub.InlineContainer(CommonContainer.managedHub, "container",
+    {
+      Container: {
+        onSecurityAlert: function(source, alertType) { /* Handle client-side security alerts
*/ },
+        onConnect: function(container){ /* Called when client connects */ },
+        onDisconnect: function(container){ /* Called when client connects */ }
+      }
+    });
+    //connect to the inline client
+    CommonContainer.inlineClient.connect();
+
+  } catch(e) {
+    // TODO: error handling should be consistent with other OS gadget initialization error
handling
+    alert("ERROR creating or connecting InlineClient in CommonContainer.managedHub [" + e.message
+ "]");
+  }
 };
 
-//Wrapper function to set the gadget site/id and default width.  Currently have some inconsistency
with width actually being set. This 
+//Wrapper function to set the gadget site/id and default width.  Currently have some inconsistency
with width actually being set. This
 //seems to be related to the pubsub2 feature.
 CommonContainer.renderGadget = function(gadgetURL, gadgetId) {
 	//going to hardcode these values for width.  



Mime
View raw message