incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r603230 - in /incubator/sling/trunk/microsling/microsling-core/src: main/java/org/apache/sling/microsling/experimental/ main/java/org/apache/sling/microsling/slingservlets/ main/webapp/ main/webapp/microjax/ main/webapp/microjax/test/ main/...
Date Tue, 11 Dec 2007 12:53:00 GMT
Author: bdelacretaz
Date: Tue Dec 11 04:52:56 2007
New Revision: 603230

URL: http://svn.apache.org/viewvc?rev=603230&view=rev
Log:
SLING-131, use 'ujax' as the short name for microjax in filenames, parameter names, etc.

Added:
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/assert.js
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/ujax-test.html
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/usling.css
      - copied unchanged from r603187, incubator/sling/trunk/microsling/microsling-core/src/main/webapp/microsling.css
Removed:
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/microjax/microjax.js
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/microjax/test/
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/microsling.css
Modified:
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxGetServlet.java
    incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxPostServlet.java
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/content-creation-forms.html
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/erb-scripts.html
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/freemarker-scripts.html
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/index.html
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/velocity-scripts.html
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/PostRedirectTest.java
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/StaticContentTest.java
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxAutoPropertiesTest.java
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxSessionInfoTest.java
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletDeleteTest.java
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletOrderTest.java
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletUpdateTest.java

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/experimental/JstScriptEngine.java Tue Dec 11 04:52:56 2007
@@ -54,7 +54,7 @@
     
     public JstScriptEngine() {
         // TODO hardcoded for now...
-        libraryScripts.add("/microjax/microjax.js");
+        libraryScripts.add("/ujax/ujax.js");
         htmlRenderer = new DefaultHtmlRenderer();
     }
     

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxGetServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxGetServlet.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxGetServlet.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxGetServlet.java Tue Dec 11 04:52:56 2007
@@ -35,13 +35,13 @@
 import org.apache.sling.commons.json.JSONException;
 import org.apache.sling.commons.json.io.JSONWriter;
 
-/** Servlet that provides some non-repository resources for microjax
+/** Servlet that provides some non-repository resources for ujax
  *  using GET requests, see SLING-92 */
 public class MicrojaxGetServlet extends SlingSafeMethodsServlet {
     private static final long serialVersionUID = -8406117284723670902L;
 
     /** Handle GET requests starting with this prefix */
-    public static final String URI_PREFIX = "/microjax:";
+    public static final String URI_PREFIX = "/ujax:";
 
     @Override
     protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException,

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxPostServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxPostServlet.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxPostServlet.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/java/org/apache/sling/microsling/slingservlets/MicrojaxPostServlet.java Tue Dec 11 04:52:56 2007
@@ -41,7 +41,9 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/** Servlet that implements the microjax POST "protocol", see SLING-92 */
+import freemarker.ext.ant.UnlinkedJythonOperationsImpl;
+
+/** Servlet that implements the ujax POST "protocol", see SLING-92 */
 public class MicrojaxPostServlet extends SlingAllMethodsServlet {
     private static final long serialVersionUID = 1837674988291697074L;
 
@@ -52,7 +54,7 @@
     /** Prefix for parameter names which control this POST
      *  (ujax stands for "microjax", RP_ stands for "request param")
      */
-    public static final String RP_PREFIX = "ujax_";
+    public static final String RP_PREFIX = "ujax:";
 
     /** Optional request parameter: redirect to the specified URL after POST */
     public static final String RP_REDIRECT_TO =  RP_PREFIX + "redirect";
@@ -266,6 +268,12 @@
 
         for(Map.Entry<String, RequestParameter[]>  e : request.getRequestParameterMap().entrySet()) {
             final String paramName = e.getKey();
+            
+            if(paramName.startsWith(RP_PREFIX)) {
+                // do not store parameters with names starting with ujax:  
+                continue;
+            }
+            
             String propertyName = paramName;
             if(savePrefix!=null) {
                 if(!paramName.startsWith(savePrefix)) {

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/content-creation-forms.html
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/content-creation-forms.html?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/content-creation-forms.html (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/content-creation-forms.html Tue Dec 11 04:52:56 2007
@@ -1,27 +1,27 @@
 <html>
 <head>
-  <title>microsling content creation forms</title>
-  <link rel="stylesheet" href="microsling.css"/>
+  <title>&micro;sling content creation forms</title>
+  <link rel="stylesheet" href="usling.css"/>
 </head>
 <body>
-  <h1>microsling content creation forms</h1>
+  <h1>&micro;sling content creation forms</h1>
   
   <div class="note">
     <a href="index.html">back to homepage</a>
   </div>
   
   <p>
-    Use these forms to test the microsling request processing and rendering SlingServlets. 
+    Use these forms to test the &micro;sling request processing and rendering SlingServlets. 
   </p>
   
   <div>
     <form class="testbox" action="content/testing/*" method="POST">
     
       <!-- these parameters mean "redirect to created node with .html extension" -->
-      <input type="hidden" name="ujax_displayExtension" value="html"/>
-      <input type="hidden" name="ujax_redirect" value="*"/>
+      <input type="hidden" name="ujax:displayExtension" value="html"/>
+      <input type="hidden" name="ujax:redirect" value="*"/>
       
-      <h1>SlingPostServlet content creation form</h1>
+      <h1>&micro;jaxPostServlet content creation form</h1>
       <p>
         Submitting this form creates an <em>nt:unstructured</em> node under content/testing, 
         and displays it using an <em>html</em> extension. 
@@ -42,7 +42,7 @@
           sling:resourceType:
           <span class="note">(leave this empty to use the JCR node type for script resolution)</span>
           <br/>
-          <input name="sling:resourceType" type="text" size="80" value="microsling/example"/>
+          <input name="sling:resourceType" type="text" size="80" value="usling/example"/>
           <br/>
 	      <input type="submit" value="Create and display node"/> 
       </p>

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/erb-scripts.html
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/erb-scripts.html?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/erb-scripts.html (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/erb-scripts.html Tue Dec 11 04:52:56 2007
@@ -1,10 +1,10 @@
 <html>
 <head>
-  <title>microsling Ruby Erb templates</title>
-  <link rel="stylesheet" href="microsling.css"/>
+  <title>&micro;sling Ruby Erb templates</title>
+  <link rel="stylesheet" href="usling.css"/>
 </head>
 <body>
-  <h1>microsling Ruby Erb templates</h1>
+  <h1>&micro;sling Ruby Erb templates</h1>
   
   <div class="note">
     <a href="../">back to homepage</a>

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/freemarker-scripts.html
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/freemarker-scripts.html?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/freemarker-scripts.html (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/freemarker-scripts.html Tue Dec 11 04:52:56 2007
@@ -1,10 +1,10 @@
 <html>
 <head>
-  <title>microsling FreeMarker templates</title>
-  <link rel="stylesheet" href="microsling.css"/>
+  <title>&micro;sling FreeMarker templates</title>
+  <link rel="stylesheet" href="usling.css"/>
 </head>
 <body>
-  <h1>microsling FreeMarker templates</h1>
+  <h1>&micro;sling FreeMarker templates</h1>
   
   <div class="note">
     <a href="index.html">back to homepage</a>

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/index.html?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/index.html (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/index.html Tue Dec 11 04:52:56 2007
@@ -1,47 +1,48 @@
 <html>
 <head>
-  <title>microsling homepage</title>
-  <link rel="stylesheet" href="microsling.css"/>
+  <title>&micro;sling homepage</title>
+  <link rel="stylesheet" href="usling.css"/>
 </head>
 <body>
-  <h1>microsling homepage</h1>
+  <h1>&micro;sling homepage</h1>
   
   <h2>Overview</h2>
   <p>
-  	microsling started as "back to basics" rewrite of Sling (which is heavier, using OSGi, and
-  	at the time was much harder to understand).
+  	&micro;sling (pronounced <em>microsling</em>) started as "back to basics" rewrite of Sling, which is heavier, using OSGi, and
+  	at the time was much harder to understand.
   </p>
   <p>
-  	As I write this (early December 2007), microsling is perfectly usable to create scripted 
+  	As I write this (early December 2007), &micro;sling is perfectly usable to create scripted 
   	JCR-based applications (it runs <a href="http://dev.day.com">dev.day.com</a> for example). 
   	We have decided to focus on javascript, using it for either server-side
   	or client side templates (see links below), or for handling other HTTP requests besides GET.
   </p>
   <p>
-  	The microjax.js client-side javascript library provides a simple javascript "proxy" on the
-  	JCR repository. 
+  	The ujax.js client-side javascript library provides a simple javascript "proxy" on the
+  	JCR repository. The name ujax should really by written &micro;jax (<em>microjax</em>), but for all
+    filenames and technical names (parameters etc.) with use "ujax" to avoid encoding problems.
   </p>
   <p>
   	Documentation and examples are scarce for now, but the automated tests (both unit and integration tests)
   	are extensive and up to date, if you can read simple java code they might help. 
   </p>
   
-  <h2>microsling main test links</h2>
+  <h2>&micro;sling main test links</h2>
   <ul>
     <li>
       <a href="content-creation-forms.html">
         Content creation forms
-      </a>. Start here: use this page to create content and test the rendering mechanisms, and then have a look
+      </a>: start here, use this page to create content and test the rendering mechanisms, and then have a look
       at the <a href="javascript.html">javascript</a> info page for rendering.
     </li>
     <li>
       <a href="javascript.html">
-        Server-side and client-side javascript templates
+        Use of javascript in &micro;sling
       </a>: explains how to use server-side javascript and javascript-based ESP and ECT templates to render content
     </li>
     <li>
-      Automated testing of the <a href="microjax/test/microjax-test.html">
-        microjax
+      Automated testing of the <a href="ujax/test/ujax-test.html">
+        &micro;jax
       </a> client-side javascript "JCR proxy" library. 
     </li>
   </ul>

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/javascript.html Tue Dec 11 04:52:56 2007
@@ -1,10 +1,10 @@
 <html>
 <head>
-  <title>Use of javascript in microsling</title>
-  <link rel="stylesheet" href="microsling.css"/>
+  <title>Use of javascript in &micro;sling</title>
+  <link rel="stylesheet" href="usling.css"/>
 </head>
 <body>
-  <h1>Use of javascript in microsling</h1>
+  <h1>Use of javascript in &micro;sling</h1>
   
   <div class="note">
     <a href="index.html">back to homepage</a>
@@ -16,8 +16,8 @@
   	now we'll leave it at that).
   </p>
   <p>
-  	If you created content with the microsling test content creation form, rendering scripts should be stored
-  	in the repository under <em>/sling/scripts/microsling/example/</em>. Mount the repository with WebDAV to
+  	If you created content with the &micro;sling test content creation form, rendering scripts should be stored
+  	in the repository under <em>/sling/scripts/usling/example/</em>. Mount the repository with WebDAV to
   	do that, see the WebDAV link on the <a href="index.html">homepage</a>.
   </p>
   <p>
@@ -51,14 +51,14 @@
       	<em>&lt;%= ... %&gt;</em> tags include the result of a javascript expression in the output.
       </li>
       <li>
-      	Several standard objects are available in javascript to access microsling data
+      	Several standard objects are available in javascript to access &micro;sling data
       	(TODO: document these objects - for now see the RhinoJavascriptServlet source code)
       </li>
     </ul>
   </p>
   <h3>ESP template example</h3>
     <pre>
-&lt;%-- microsling ESP template example, store this as html.esp --%>
+&lt;%-- ESP template example, store this as html.esp --%>
 &lt;html>
 &lt;body>
 &lt;p>This page is generated from an ESP template!&lt;/p>
@@ -128,7 +128,7 @@
     <code>slingComponentId</code> property.
   </p>
   <pre>
-&lt;%-- microsling ESP directory listing example -%>
+&lt;%-- ESP directory listing example -%>
 &lt;html>
 &lt;body>
 &lt;p>This HTML directory listing is generated from an ESP template!&lt;/p>
@@ -137,7 +137,7 @@
 &lt;%
 for (var prop in resource.node) {
     if (resource.node[prop]["text"]) {
-        %>&lt;li>&lt;a href="/microsling&lt;%= resource.node[prop] %>.html">&lt;%= resource.node[prop] %>&lt;/a>&lt;/li>&lt;%
+        %>&lt;li>&lt;a href="/&lt;%= resource.node[prop] %>.html">&lt;%= resource.node[prop] %>&lt;/a>&lt;/li>&lt;%
     }
 }
 %>

Added: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/assert.js
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/assert.js?rev=603230&view=auto
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/assert.js (added)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/assert.js Tue Dec 11 04:52:56 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* 
+	Minimal javascript assertion framework, used for ujax automated testing.
+	
+	$Id$
+ */
+
+function assert(message,condition) {
+  if(condition != true) {
+    alert("Assertion failed: " + message);
+  }
+}
+
+function assertEquals(message,a,b) {
+  if(a!=b) {
+    alert("assertEquals failed: " + message + ": " + a + "!=" + b);
+  }
+}
+
+function assertNotNull(message,o) {
+  if(o==null) {
+    alert("assertNotNull failed: " + message);
+  }
+}
+
+function assertNull(message,o) {
+  if(o!=null) {
+    alert("assertNull failed: " + message);
+  }
+}

Added: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/ujax-test.html
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/ujax-test.html?rev=603230&view=auto
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/ujax-test.html (added)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/test/ujax-test.html Tue Dec 11 04:52:56 2007
@@ -0,0 +1,132 @@
+<html>
+	<!--
+	   Licensed to the Apache Software Foundation (ASF) under one or more
+	   contributor license agreements.  See the NOTICE file distributed with
+	   this work for additional information regarding copyright ownership.
+	   The ASF licenses this file to You under the Apache License, Version 2.0
+	   (the "License"); you may not use this file except in compliance with
+	   the License.  You may obtain a copy of the License at
+	
+	       http://www.apache.org/licenses/LICENSE-2.0
+	
+	   Unless required by applicable law or agreed to in writing, software
+	   distributed under the License is distributed on an "AS IS" BASIS,
+	   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	   See the License for the specific language governing permissions and
+	   limitations under the License.
+	  -->
+
+	<head>
+		<title>&micro;jax test page</title>
+		<link rel="stylesheet" type="text/css" href="../../usling.css"/>
+		<script src="../ujax.js"></script>
+		<script src="assert.js"></script>
+    
+        <style type="text/css">
+          .output {
+            background-color: #FFFF99;
+            border: solid black 1px;
+            padding: 2px;
+          }
+        </style>
+	</head>
+	
+	<body onLoad="runTests()">
+ 
+	 <h1>Automated &micro;jax tests</h1>
+	 <p>
+	   Loading this page executes some simple automated javascript tests of the &micro;jax library.
+	 </p>
+	 
+	 <h2>Test results</h2>
+	 <p>
+	 	If all goes well, the paragraph styled <span class="output">like this</span> below should say "Done running tests".
+     </p>
+     <p>
+	 	Tests run quickly, this might have happened already.
+	 </p>
+	 <p>
+	 	To run the tests again click <a href="javascript:runTests()">here</a>.
+	 </p>
+	 <div id="output" class="output" style="padding:1em">
+	   Tests are not running yet.
+	 </div>
+	 
+	 <h2>More info</h2>
+	 <p>
+	 	After running the tests at least once,
+		<a href="/ujax-test/testhtml-nodes.json">/ujax-test/testhtml-nodes.json</a>
+		should show the JSON data of the nodes created by the test cases.
+	 </p>
+	 <p>
+	 	See the source code of this page for details.
+	 </p>
+	   
+ 
+	<script language="javascript">
+	  function ujaxPost(url,params) {
+	    var httpcon = ujax.getXHR();
+	    httpcon.open("POST", url, false);
+	    httpcon.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+	    httpcon.setRequestHeader("Content-length", params.length);
+	    httpcon.setRequestHeader("Connection", "close");
+	    httpcon.send(params);
+	    return httpcon;
+	  }
+	  
+	  var now = new Date().getTime();
+	  var testPath = "/ujax-test/testhtml-nodes/test-" + now;
+	  
+	  function testPost() {
+	    var c = ujaxPost(testPath,"title=hello&created=&dummy=&time=" + now);
+	    assert("Expected 200 status for POST",c.status == 200);
+	  }
+	  
+	  function verifyPostedElement() {
+	    var data = ujax.getContent(testPath,1);
+	    assertNotNull("data",data);
+	    assertEquals("title matches","hello",data.title);
+	    assertEquals("time matches",now,data.time);
+	    assertEquals("created property is a string","string",typeof(data.created));
+        // TODO implement 'created' autoset property
+	    // assert("created property is not empty",data.created.length > 0);
+	    assertEquals("dummy property is a string","string",typeof(data.dummy));
+	    assert("dummy property is empty",data.dummy.length == 0);
+	  }
+	  
+	  function testGetSessionInfo() {
+	    var session = ujax.getSessionInfo();
+	    assertEquals("session.userID is a string","string",typeof(session.userID));
+        assertEquals("session.userID == 'admin'","admin",session.userID);
+	    assertEquals("session.workspace is a string","string",typeof(session.workspace));
+	    assert("session.workspace contains 'default'",session.workspace.indexOf('default') >= 0);
+	  }
+	  
+	  function testRemoveContent() {
+		var deletePath = "/ujax-test/testhtml-nodes/delete-" + now;
+	    var c = ujaxPost(deletePath,"title=hello&created=&dummy=&time=" + now);
+	    assert("Expected 200 status for POST",c.status == 200);
+	    
+	    var data = ujax.getContent(deletePath,1);
+	    assertNotNull("data must be found before removeContent",data);
+	    
+	    var d = ujax.removeContent(deletePath);
+	    assert("Expected 200 status for removeContent, got " + d.status,d.status == 200);
+	    data = ujax.getContent(deletePath,1);
+	    assertNull("data should be gone after deletePath (" + deletePath + ")",data);
+	  }
+	  
+	  function runTests() {
+	    var out = document.getElementById("output");
+	    out.innerHTML = "Tests are running...";
+	    assert(null,2 + 2 == 4);
+	    testPost();
+	    verifyPostedElement();
+	    testGetSessionInfo();
+	    testRemoveContent();
+	    out.innerHTML = "<b>Done running tests, at " + new Date() + "</b>";
+	  }
+	</script>
+  
+ </body>
+</html>

Added: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js?rev=603230&view=auto
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js (added)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js Tue Dec 11 04:52:56 2007
@@ -0,0 +1,402 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * 	The ujax javascript client gives access to a JCR repository
+ *	from client-side java code, using microsling as a back-end.	   
+ *	 
+ * @version $Rev: $, $Date: 2007-03-27 16:30:52 +0200 (Tue, 27 Mar 2007) $
+ */
+
+var ujax = null;
+
+// start ujax code scope
+(function() {
+
+	ujax = new Object();
+	ujax.NAME_OF_THIS_FILE = "ujax.js";
+	
+	/** This method tries to figure out what to do with a page */
+	ujax.wizard = function() {
+	    //TODO add lots of magic here
+	    var form=document.getElementById("ujaxform");
+	    if (!form) form=document.forms[0];
+	    if (form) {
+	        var sp=new Object();
+	        sp.formElement=form;
+	        ujax.setupPage(sp);
+	    }
+	
+	}
+	/** Call this to merge ujax data in an HTML page
+		TODO deprecate other functions
+	*/
+	ujax.setupPage = function(options) {
+	  var tree = ujax.getContent(ujax._getJsonUrl(),1);
+	  
+	  if(options.formElement) {
+		ujax._setFormValues(options.formElement,ujax._getJsonUrl(),tree);
+	  }
+	  
+	  if(options.displayElement) {
+	  	ujax.displayValues(options.displayElement,tree);
+	  }
+	}
+	
+	/**
+	 * HTTP GET XHR Helper
+	 * @param {String} url The URL
+	 * @return the XHR object, use .responseText for the data
+	 * @type String
+	 */
+	ujax.httpGet = function(url) {
+	    var httpcon = ujax.getXHR();
+	    if (httpcon) {
+			httpcon.open('GET', url, false);
+			httpcon.send(null);
+			return httpcon;
+	    } else {
+			return null;
+	    }
+	}
+	/**
+	 * Produces a "sort-of-json" string representation of a object
+	 * for debugging purposes only
+	 * @param {Object} obj The object
+	 * @param {int} level The indentation level
+	 * @return The result
+	 * @type String
+	 */
+	ujax.dumpObj = function(obj, level) {
+		var res="";
+		for (var a in obj) {
+			if (typeof(obj[a])!="object") {
+				res+=a+":"+obj[a]+"  ";
+			} else {
+				res+=a+": { ";
+				res+=ujax.dumpObj(obj[a])+"} ";
+			}
+		}
+		return (res);
+	}
+	
+	/** Produces an aggregate of get all the property names used
+	 * in a tree as a helper for table oriented display
+	 * @param {Object} obj The Content Tree object
+	 * @param {Object} names internal object used for collecting all
+	 *  the names during the recursion
+	 * @return An Array of names of properties that exist in a tree
+	 * @type Array
+	 */
+	ujax.getAllPropNames = function(obj, names) {
+		var root=false;
+	    if (!names) {
+	        names=new Object();
+	        root=true;
+	    }
+	    for (var a in obj) {
+			if (typeof(obj[a])!="object") {
+	            names[a]="1";
+			} else {
+				getAllPropNames(obj[a], names);
+			}
+	    }
+	    if (root) {
+	        var ar=new Array();
+	        var i=0;
+	        for (var a in ar) {
+	            ar[i]=a;
+	            i++;
+	        }
+	        names=ar;
+	    }
+	    return (names);
+	}
+	
+	/** Reads a tree of items given a maxlevel from the repository as JSON
+	 * @param {String} path Path into the current workspace
+	 * @param {int} maxlevel maximum depth to traverse to
+	 * @param {Array} filters filter only these properties
+	 * @return An Object tree of content nodes and properties, null if not found
+	 * @type Object
+	 */
+	ujax.getContent = function(path, maxlevels) {
+	    var obj=new Object();
+	    if (!path)  {
+	        path=ujax.currentPath;
+	    }
+	    if (path.indexOf("/")==0) {
+			/*
+			this assumes that paths that start with a slash
+			are meant to be workspace paths rather than URLs
+			and therefore need some additions before they are sent
+			to the server
+			*/
+			path=ujax.baseurl+path+".json";
+		}
+	    //checking for a trailing "/*"
+	    if (path.indexOf("/*")>=0) return obj;
+	
+		// TODO for now we explicitely defeat caching on this...there must be a better way
+		// but in tests IE6 tends to cache too much
+		var passThroughCacheParam = "?clock=" + new Date().getTime();
+	    var res=ujax.httpGet(path + passThroughCacheParam + (maxlevels?"&maxlevels="+maxlevels:""));
+	    
+	    if(res.status == 200) {
+	    	return ujax.evalString(res.responseText);
+	    }
+	    return null; 
+	}
+	
+	/** Remove content by path */
+	ujax.removeContent = function(path) {
+		var httpcon = ujax.getXHR();
+		if (httpcon) {
+			var params = "ujax:delete="+path;
+			httpcon.open('POST', ujax.baseurl + ujax.currentPath, false);
+
+			// Send the proper header information along with the request
+			httpcon.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+			httpcon.setRequestHeader("Content-length", params.length);
+			httpcon.setRequestHeader("Connection", "close");
+			httpcon.send(params);
+			return httpcon;
+		} else {
+			return false;
+		}
+	}
+	
+	/** eval str, accepting various object delimiters */
+	ujax.evalString = function(str) {
+		var obj = null;
+	    if(str.indexOf('[')==0) {
+		    eval("obj="+str);
+	    } else if(str.indexOf('{')==0) {
+	        eval("obj="+str);
+	    } else {
+		    eval("obj={"+str+"}");
+		}
+		return obj;
+	}
+	 
+	/** Get "session info" from repository. Mainly answers the question: "Who am I"
+	 *  and "Which workspace am I logged into.
+	 * @return An Object tree containing the session information, null if server status <> 200
+	 * @type Object
+	 */
+	ujax.getSessionInfo = function() {
+	    var res=ujax.httpGet(ujax.baseurl+"/ujax:sessionInfo.json");
+	    if(res.status == 200) {
+	    	return ujax.evalString(res.responseText);
+	    }
+	    return null;
+	}
+	
+	/** Replace extension in a path */
+	ujax._replaceExtension = function(path,newExtension) {
+		var i = path.lastIndexOf(".");
+		if(i >= 0) path = path.substring(0,i);
+		i = path.lastIndexOf(".");
+		if(i >= 0) path = path.substring(0,i);
+		return path + newExtension;
+	}
+	
+	/** Get the JSON data URL that for the current page
+	 *	(assuming a .extension for the current page, .html or something else)	
+	 */
+	ujax._getJsonUrl = function() {
+	  return ujax._replaceExtension(window.location.href,".json");
+	}
+	
+	/** Get the content repository path from the URL
+	 *	(assuming a .extension for the current page, .html or something else)
+	 */
+	ujax._getPath = function() {
+	
+	    var noextensions=ujax._replaceExtension(window.location.href,"");
+	    var path=noextensions.substring(ujax.baseurl.length);
+	    return (path);
+	}
+	
+	/** Display values inside a container: an element inside given container,
+	 *	with an id like ./stuff, has its innerHTML set to the value of stuff
+	 *	in the tree, if it exists.
+	 */
+	ujax.displayValues = function(container,tree) {
+	  if(!tree) {
+	    tree = ujax.getContent(ujax._getJsonUrl(),1);
+	  }
+	  
+	  var elements = container.getElementsByTagName("*"); 
+	  var toSet = new Array();
+	  for (var i = 0; i < elements.length; i++) { 
+	    var value = ujax._getElementValue(elements[i],tree);
+	    if(value) {
+	      toSet[toSet.length] = { e:elements[i], v:value };
+	    }
+	  }
+	  
+	  for(var i = 0; i < toSet.length; i++) {
+	    toSet[i].e.innerHTML = toSet[i].v;
+	  }
+	}
+	
+	/** If e has an ID that matches a property of tree, set e's innerHTML accordingly */
+	ujax._getElementValue = function(e,tree) {
+	  var id = e.getAttribute("id");
+	  if(id) {
+	    return tree[id.substring(2)];
+	  }
+	}
+	
+	  
+	/** Set form elements based on the tree of items passed into the method
+	 * @param {IdOrElement} form the Form element to set, or its id
+	 * @param {String} path passes a string specifying the path
+	 * @param {Object} tree optionally pass the content that you want the
+	 * form to be populated with. This assumes an item tree as returned by
+	 * getContent().
+	 * Returns an object indicating whether data was found on the server.
+	 *
+	 */
+	ujax._setFormValues = function(form, path, tree) {
+		var result = new Object();
+		
+	    /** TODO: deal with abolute paths?
+	     *  TODO: deal with @ValueFrom
+	     */
+	    if (!path) return;
+	
+	    form.setAttribute("action", path);
+	
+	    if (!tree) {
+			tree=ujax.getContent(path,1);
+	    }
+	
+	    var elems=form.elements;
+	    var i=0;
+	    formfieldprefix="";
+	
+	    while (elems.length > i) {
+	        var elem=elems[i];
+	        var a=elem.name;
+	        if (a.indexOf("./")==0) {
+	            formfieldprefix="./";
+	            break;
+	        }
+	        i++;
+	    }
+	
+	    var i=0;
+	    while (elems.length > i) {
+	        var elem=elems[i];
+	        var a=elem.name;
+	        if (a.indexOf(formfieldprefix)==0) {
+	            var propname=a.substring(formfieldprefix.length);
+	            if (tree[propname]) {
+	            	if (elem.type == "file") {
+	            		// cannot edit uplodaded files for now
+	                } else if (elem.type == "checkbox") {
+	                    var vals;
+	                    if (typeof(tree[propname])=="object") vals=tree[a.substring(2)];
+	                    else {
+	                        vals=new Array();
+	                        vals[0]=tree[propname];
+	                    }
+	                    var j=0;
+	                    while (vals.length > j) {
+	                        if (vals[j] == elem.value) elem.checked=true;
+	                        j++;
+	                    }
+	                 } else {
+	                    elem.value=tree[propname];
+	                 }
+	            }
+	
+	        }
+	        i++;
+	    }
+	    
+	}
+	
+	/** return Path as specified as the URL Parameter
+	 *  @param URL
+	 *  @return The Path parameter isolated from the URL
+	 *  @type String
+	 */
+	ujax.TODO_NOT_USED_isolatePathFromUrl = function(url) {
+	  var pattern = "[\\?&]Path=([^&#]*)";
+	  var regex = new RegExp( pattern );
+	  var results = regex.exec( url );
+	  if( results == null )
+	        // none found
+	        return "";
+	  else
+	        // found
+	        return unescape(results[1]);
+	}
+	
+	/**
+	 *	Get an XMLHttpRequest in a portable way
+	 *		
+	 */
+	ujax.getXHR = function () {
+		var xhr=null;
+		
+		if(!xhr) {
+			try {
+				// built-in (firefox, recent Opera versions, etc)
+				xhr=new XMLHttpRequest();
+			} catch (e) {
+				// ignore
+			}
+		}
+		
+		if(!xhr) {
+			try {
+				// IE, newer versions
+				xhr=new ActiveXObject("Msxml2.XMLHTTP");
+			} catch (e) {
+				// ignore
+			}
+		}
+		
+		if(!xhr) {
+			try {
+				// IE, older versions
+				xhr=new ActiveXObject("Microsoft.XMLHTTP");
+			} catch (e) {
+				// ignore
+			}
+		}
+		
+		if(!xhr) {
+			alert("Unable to access XMLHttpRequest object, ujax will not work!");
+		}
+		
+		return xhr;
+	}
+	
+	// obtain the base_url to communicate with ujax on the server
+	var scripts = document.getElementsByTagName("SCRIPT")
+	var script = scripts[scripts.length-1].src
+	ujax.baseurl = script.substring(0,script.length - ("/" + ujax.NAME_OF_THIS_FILE.length));
+	ujax.currentPath = ujax._getPath();
+	ujax.isNew  = (ujax.currentPath.indexOf("/*")>=0)?true:false;
+
+// end ujax code scope	
+})();
\ No newline at end of file

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/velocity-scripts.html
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/velocity-scripts.html?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/velocity-scripts.html (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/velocity-scripts.html Tue Dec 11 04:52:56 2007
@@ -1,10 +1,10 @@
 <html>
 <head>
-  <title>microsling Velocity templates</title>
-  <link rel="stylesheet" href="microsling.css"/>
+  <title>&micro;sling Velocity templates</title>
+  <link rel="stylesheet" href="usling.css"/>
 </head>
 <body>
-  <h1>microsling Velocity templates</h1>
+  <h1>&micro;sling Velocity templates</h1>
   
   <div class="note">
     <a href="index.html">back to homepage</a>
@@ -22,10 +22,10 @@
   	is found, it used as a Velocity template to render the content.
   </p>
   <p>
-  	To test this, try storing (via WebDAV, see mount point URL on the microsling homepage) the following script in your 
-  	repository under <em> /sling/scripts/microsling/example/html.vlt</em> . 
-    Doing so will cause microsling to use that script
-  	to render nodes having <em>sling:resourceType=microsling/example</em>. 
+  	To test this, try storing (via WebDAV, see mount point URL on the &micro;sling homepage) the following script in your 
+  	repository under <em> /sling/scripts/usling/example/html.vlt</em> . 
+    Doing so will cause &micro;sling to use that script
+  	to render nodes having <em>sling:resourceType=usling/example</em>. 
   </p>
   <p>
     To try that rendering, use the <a href="content-creation-forms.html">content creation</a> page to create

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/PostRedirectTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/PostRedirectTest.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/PostRedirectTest.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/PostRedirectTest.java Tue Dec 11 04:52:56 2007
@@ -29,7 +29,7 @@
     
     public void testForcedRedirect() throws IOException {
         final Map<String,String> params = new HashMap<String,String>();
-        params.put("ujax_redirect","http://forced/");
+        params.put("ujax:redirect","http://forced/");
         final Map<String,String> headers = new HashMap<String,String>();
         headers.put("Referer", "http://referer/");
         
@@ -54,7 +54,7 @@
     
     public void testMagicStarRedirect() throws IOException {
         final Map<String,String> params = new HashMap<String,String>();
-        params.put("ujax_redirect","*");
+        params.put("ujax:redirect","*");
         final Map<String,String> headers = new HashMap<String,String>();
         headers.put("Referer", "http://referer/");
         final String location = testClient.createNode(postUrl, params, headers);

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/StaticContentTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/StaticContentTest.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/StaticContentTest.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/StaticContentTest.java Tue Dec 11 04:52:56 2007
@@ -27,11 +27,11 @@
     }
     
     public void testContentTypeCss() throws IOException {
-        getContent(HTTP_BASE_URL + "/microsling.css", CONTENT_TYPE_CSS);
+        getContent(HTTP_BASE_URL + "/usling.css", CONTENT_TYPE_CSS);
     }
     
     public void testContentTypeJs() throws IOException {
-        getContent(HTTP_BASE_URL + "/microjax/microjax.js", CONTENT_TYPE_JS);
+        getContent(HTTP_BASE_URL + "/ujax/ujax.js", CONTENT_TYPE_JS);
     }
     
     public void testWebInfForbidden() throws IOException {

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxAutoPropertiesTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxAutoPropertiesTest.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxAutoPropertiesTest.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxAutoPropertiesTest.java Tue Dec 11 04:52:56 2007
@@ -30,7 +30,7 @@
 
 public class MicrojaxAutoPropertiesTest extends MicroslingHttpTestBase {
 
-    public static final String TEST_BASE_PATH = "/microjax-tests";
+    public static final String TEST_BASE_PATH = "/ujax-tests";
     private String postUrl;
     
     @Override

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxSessionInfoTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxSessionInfoTest.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxSessionInfoTest.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/MicrojaxSessionInfoTest.java Tue Dec 11 04:52:56 2007
@@ -22,16 +22,16 @@
 
 import org.apache.sling.microsling.integration.MicroslingHttpTestBase;
 
-/** Test the microjax:sessionInfo resource */
+/** Test the ujax:sessionInfo resource */
 
 public class MicrojaxSessionInfoTest extends MicroslingHttpTestBase {
     
     public void testSessionInfo() throws IOException {
-        final String content = getContent(HTTP_BASE_URL + "/microjax:sessionInfo.json", CONTENT_TYPE_JSON);
+        final String content = getContent(HTTP_BASE_URL + "/ujax:sessionInfo.json", CONTENT_TYPE_JSON);
         assertJavascript("admin.default", content, "out.println(data.userID + '.' + data.workspace)");
     }
     
     public void testNonexistentMicrojaxUrl() throws IOException {
-        assertHttpStatus(HTTP_BASE_URL + "/microjax:nothing", HttpServletResponse.SC_NOT_FOUND);
+        assertHttpStatus(HTTP_BASE_URL + "/ujax:nothing", HttpServletResponse.SC_NOT_FOUND);
     }
 }

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletCreateTest.java Tue Dec 11 04:52:56 2007
@@ -26,7 +26,7 @@
 
 /** Test node creation via the MicrojaxPostServlet */
 public class PostServletCreateTest extends MicroslingHttpTestBase {
-    public static final String TEST_BASE_PATH = "/microjax-tests";
+    public static final String TEST_BASE_PATH = "/ujax-tests";
     private String postUrl;
     
     @Override
@@ -101,7 +101,7 @@
         props.put("++a","123");
         props.put("++b","456");
         props.put("c","not saved");
-        props.put("ujax_saveParamPrefix","++");
+        props.put("ujax:saveParamPrefix","++");
         final String createdNodeUrl = testClient.createNode(postUrl + "/*", props);
         final String content = getContent(createdNodeUrl + ".json", CONTENT_TYPE_JSON);
         assertJavascript("123456", content, "out.println(data.a + data.b)");

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletDeleteTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletDeleteTest.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletDeleteTest.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletDeleteTest.java Tue Dec 11 04:52:56 2007
@@ -27,7 +27,7 @@
 
 /** Test node deletion via the MicrojaxPostServlet */
 public class PostServletDeleteTest extends MicroslingHttpTestBase {
-    public static final String TEST_BASE_PATH = "/microjax-tests";
+    public static final String TEST_BASE_PATH = "/ujax-tests";
     private String postUrl;
     
     @Override
@@ -55,7 +55,7 @@
         
         // delete one and check
         final List <NameValuePair> params = new LinkedList<NameValuePair> ();
-        final String deleteCmd = "ujax_delete";
+        final String deleteCmd = "ujax:delete";
         params.add(new NameValuePair(deleteCmd,urlToNodePath(urlA)));
         assertPostStatus(postUrl,HttpServletResponse.SC_OK,params,"Delete must return status OK (1)");
         assertHttpStatus(urlA, HttpServletResponse.SC_NOT_FOUND, "A must be deleted (1)");

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletOrderTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletOrderTest.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletOrderTest.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletOrderTest.java Tue Dec 11 04:52:56 2007
@@ -26,7 +26,7 @@
 
 /** Test the order option for node creation via the MicrojaxPostServlet */
 public class PostServletOrderTest extends MicroslingHttpTestBase {
-    public static final String TEST_BASE_PATH = "/microjax-tests";
+    public static final String TEST_BASE_PATH = "/ujax-tests";
     private String postUrl;
     
     @Override
@@ -67,7 +67,7 @@
     /** Create several nodes with the order option, and check ordering */
     public void testZeroOrder() throws IOException {
         final Map <String, String> props = new HashMap <String, String> ();
-        props.put("ujax_order","0");
+        props.put("ujax:order","0");
         
         final String [] nodeUrl = new String[4];
         nodeUrl[0] = testClient.createNode(postUrl + "/*", props);

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletUpdateTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletUpdateTest.java?rev=603230&r1=603229&r2=603230&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletUpdateTest.java (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/microjax/PostServletUpdateTest.java Tue Dec 11 04:52:56 2007
@@ -26,7 +26,7 @@
 
 /** Test node updates via the MicrojaxPostServlet */
 public class PostServletUpdateTest extends MicroslingHttpTestBase {
-    public static final String TEST_BASE_PATH = "/microjax-tests";
+    public static final String TEST_BASE_PATH = "/ujax-tests";
     private String postUrl;
     
     @Override



Mime
View raw message