chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1064720 - in /incubator/chemistry/opencmis-browser-binding/trunk/src/main: java/org/apache/chemistry/opencmis/server/impl/browser/BrowserBindingUtils.java webapp/create.html
Date Fri, 28 Jan 2011 15:09:08 GMT
Author: fmui
Date: Fri Jan 28 15:09:08 2011
New Revision: 1064720

URL: http://svn.apache.org/viewvc?rev=1064720&view=rev
Log:
- bug fix: don't skip early detected errors

Modified:
    incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/BrowserBindingUtils.java
    incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/create.html

Modified: incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/BrowserBindingUtils.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/BrowserBindingUtils.java?rev=1064720&r1=1064719&r2=1064720&view=diff
==============================================================================
--- incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/BrowserBindingUtils.java
(original)
+++ incubator/chemistry/opencmis-browser-binding/trunk/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/BrowserBindingUtils.java
Fri Jan 28 15:09:08 2011
@@ -157,6 +157,10 @@ public class BrowserBindingUtils {
      */
     public static void prepareContext(CallContext context, CallUrl callUrl, CmisService service,
String repositoryId,
             String objectId, String transaction, HttpServletRequest request) {
+        if (context instanceof CallContextImpl) {
+            ((CallContextImpl) context).put(CONTEXT_TRANSACTION, transaction);
+        }
+        
         if (callUrl != CallUrl.ROOT) {
             return;
         }
@@ -177,7 +181,6 @@ public class BrowserBindingUtils {
                     getProperty(object, PropertyIds.OBJECT_TYPE_ID, String.class));
             ((CallContextImpl) context).put(CONTEXT_BASETYPE_ID,
                     getProperty(object, PropertyIds.BASE_TYPE_ID, String.class));
-            ((CallContextImpl) context).put(CONTEXT_TRANSACTION, transaction);
         }
     }
 

Modified: incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/create.html
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/create.html?rev=1064720&r1=1064719&r2=1064720&view=diff
==============================================================================
--- incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/create.html (original)
+++ incubator/chemistry/opencmis-browser-binding/trunk/src/main/webapp/create.html Fri Jan
28 15:09:08 2011
@@ -49,23 +49,23 @@ function createDocument() {
 }
 
 function createDocumentCallback() {
-	if(lastTransaction) {
-		document.getElementById('info').innerHTML = 'Transaction: ' + lastTransaction
+    if(lastTransaction) {
+        document.getElementById('info').innerHTML = 'Transaction: ' + lastTransaction
 
-		var script1 = document.createElement("script");
-		script1.setAttribute("src", repositoryUrl + "?selector=lastResult&clientToken=showNewDocumentId&transaction="+lastTransaction);
-		script1.setAttribute("type","text/javascript");                
-		document.body.appendChild(script1);
-	}
+        var script1 = document.createElement("script");
+        script1.setAttribute("src", repositoryUrl + "?selector=lastResult&clientToken=showNewDocumentId&transaction="+lastTransaction);
+        script1.setAttribute("type","text/javascript");                
+        document.body.appendChild(script1);
+     }
 }
 
 function showNewDocumentId(result) {
-	if(result.objectId) {
-		alert("New document id: " + result.objectId + " (code: " + result.code + ")");
-	}
-	else {
-		alert("Error: " + result.error + " (code: " + result.code + ")");
-	}
+    if(result.objectId) {
+       alert("New document id: " + result.objectId + " (code: " + result.code + ")");
+    }
+    else {
+        alert("Error: " + result.error + " (code: " + result.code + ")");
+    }
 }
 </script>
 </head>



Mime
View raw message