You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by li...@apache.org on 2010/07/19 16:30:30 UTC

svn commit: r965500 - in /shindig/trunk/features/src/main/javascript/features: osapi/gadgetsrpctransport.js osapi/osapi.js shindig.container/feature.xml

Author: lindner
Date: Mon Jul 19 14:30:29 2010
New Revision: 965500

URL: http://svn.apache.org/viewvc?rev=965500&view=rev
Log:
SHINDIG-1380 | Patch from Randy Watler | Sample Container RPC Javascript Errors

Modified:
    shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js
    shindig/trunk/features/src/main/javascript/features/osapi/osapi.js
    shindig/trunk/features/src/main/javascript/features/shindig.container/feature.xml

Modified: shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js?rev=965500&r1=965499&r2=965500&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js (original)
+++ shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js Mon Jul 19 14:30:29 2010
@@ -95,7 +95,10 @@ if (gadgets && gadgets.rpc) { //Dont bin
         osapi.container.listMethods({}).execute(function(response) {
           if (!response.error) {
             for (var i = 0; i < response.length; i++) {
-              osapi._registerMethod(response[i], transport);
+              // do not rebind container.listMethods implementation
+              if (response[i] != "container.listMethods") {
+                osapi._registerMethod(response[i], transport);
+              }
             }
           }
           // Notify completion

Modified: shindig/trunk/features/src/main/javascript/features/osapi/osapi.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/osapi/osapi.js?rev=965500&r1=965499&r2=965500&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/osapi/osapi.js (original)
+++ shindig/trunk/features/src/main/javascript/features/osapi/osapi.js Mon Jul 19 14:30:29 2010
@@ -23,6 +23,13 @@
    * @param {Object.<string,Object>} transport The transport used to execute a call for the method
    */
   osapi._registerMethod = function (method, transport) {
+
+    // Skip registration of local newBatch implementation.
+    if (method == "newBatch") {
+        return;
+    }
+
+    // Lookup last method value.
     var parts = method.split(".");
     var last = osapi;
     for (var i = 0; i < parts.length - 1; i++) {

Modified: shindig/trunk/features/src/main/javascript/features/shindig.container/feature.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/shindig.container/feature.xml?rev=965500&r1=965499&r2=965500&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/shindig.container/feature.xml (original)
+++ shindig/trunk/features/src/main/javascript/features/shindig.container/feature.xml Mon Jul 19 14:30:29 2010
@@ -31,5 +31,6 @@ A map of view names to view attributes. 
     <script src="util.js"/>
     <script src="cookies.js"/>
     <script src="shindig-container.js"/>
+    <script src="osapi.js"/>
   </container>
 </feature>