incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r820125 [2/4] - in /websites/staging/sling/trunk/content: ./ documentation/ documentation/bundles/ documentation/getting-started/ documentation/the-sling-engine/ documentation/the-sling-engine/authentication/ documentation/tutorials-how-tos/
Date Sun, 03 Jun 2012 17:58:07 GMT
Modified: websites/staging/sling/trunk/content/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html (original)
+++ websites/staging/sling/trunk/content/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-post.html Sun Jun  3 17:58:06 2012
@@ -90,11 +90,18 @@
 <li><a href="#slingpostservlet-operations">SlingPostServlet Operations</a><ul>
 <li><a href="#content-creation-or-modification">Content Creation or Modification</a><ul>
 <li><a href="#setting-property-values">Setting Property Values</a><ul>
+<li><a href="#file-uploads">File Uploads</a></li>
+<li><a href="#date-properties">Date properties</a></li>
+<li><a href="#omitting-some-parameters">Omitting Some Parameters</a></li>
 <li><a href="#controlling-content-updates-with-suffixes">Controlling Content Updates with @ Suffixes</a><ul>
 <li><a href="#typehint">@TypeHint</a></li>
+<li><a href="#defaultvalue">@DefaultValue</a></li>
 <li><a href="#usedefaultwhenmissing">@UseDefaultWhenMissing</a></li>
+<li><a href="#ignoreblanks">@IgnoreBlanks</a></li>
 <li><a href="#valuefrom">@ValueFrom</a></li>
+<li><a href="#delete">@Delete</a></li>
 <li><a href="#movefrom">@MoveFrom</a></li>
+<li><a href="#copyfrom">@CopyFrom</a></li>
 </ul>
 </li>
 <li><a href="#algorithm-for-node-name-creation">Algorithm for Node Name Creation</a></li>
@@ -177,12 +184,14 @@
 
 
 <p>You might want to use a specific JCR node type for a newly created node. This is possibly by simply setting a <code>jcr:primaryType</code> property on the request, e.g.</p>
-<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">curl</span> <span class="o">-</span><span class="n">F</span><span class="s">&quot;jcr:primaryType=nt:unstructured&quot;</span> <span class="o">-</span><span class="n">Ftitle</span><span class="o">=</span><span class="s">&quot;some title text&quot;</span> <span class="o">-</span><span class="n">Ftext</span><span class="o">=</span><span class="s">&quot;some body text content&quot;</span> <span class="n">http:</span><span class="sr">//</span><span class="n">host</span><span class="sr">/some/</span><span class="k">new</span><span class="o">/</span><span class="n">content</span>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">curl</span> <span class="o">-</span><span class="n">F</span><span class="s">&quot;jcr:primaryType=nt:unstructured&quot;</span> <span class="o">-</span><span class="n">Ftitle</span><span class="o">=</span><span class="s">&quot;some title text&quot;</span> <span class="o">\</span>    
+    <span class="o">-</span><span class="n">Ftext</span><span class="o">=</span><span class="s">&quot;some body text content&quot;</span> <span class="n">http:</span><span class="sr">//</span><span class="n">host</span><span class="sr">/some/</span><span class="k">new</span><span class="o">/</span><span class="n">content</span>
 </pre></div>
 
 
 <p>Similary you may assing JCR mixin node types using the <code>jcr:mixinTypes</code> property and a Sling resource type using the <code>sling:resourceType</code> property. For example:</p>
-<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">curl</span> <span class="o">-</span><span class="n">F</span><span class="s">&quot;sling:resourceType=sling:sample&quot;</span> <span class="o">-</span><span class="n">Ftitle</span><span class="o">=</span><span class="s">&quot;some title text&quot;</span> <span class="o">-</span><span class="n">Ftext</span><span class="o">=</span><span class="s">&quot;some body text content&quot;</span> <span class="n">http:</span><span class="sr">//</span><span class="n">host</span><span class="sr">/some/</span><span class="k">new</span><span class="o">/</span><span class="n">content</span>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">curl</span> <span class="o">-</span><span class="n">F</span><span class="s">&quot;sling:resourceType=sling:sample&quot;</span> <span class="o">-</span><span class="n">Ftitle</span><span class="o">=</span><span class="s">&quot;some title text&quot;</span> <span class="o">\</span>    
+    <span class="o">-</span><span class="n">Ftext</span><span class="o">=</span><span class="s">&quot;some body text content&quot;</span> <span class="n">http:</span><span class="sr">//</span><span class="n">host</span><span class="sr">/some/</span><span class="k">new</span><span class="o">/</span><span class="n">content</span>
 </pre></div>
 
 
@@ -205,7 +214,7 @@
 <p>All these operations always operate on the resource of the request as returned by <code>SlingHttpServletRequest.getResource()</code>. Some operations require additional parameters to be set to operate completely.</p>
 <p>Please note that operations are mutually exclusive. For a single POST request only one operation may be executed. Operations also only consume the request parameters as described below. Any excess parameters are silently ignored.</p>
 <p>{note:title=Automated Tests}
-Note that the <code>launchpad/testing</code> module contains a number of <a href="">integration tests</a> for the SlingPostServlet. Most of these tests are fairly readable, and can be used to find out more details about the servlet's behavior.
+Note that the <code>launchpad/testing</code> module contains a number of <a href="http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/post/">integration tests</a> for the SlingPostServlet. Most of these tests are fairly readable, and can be used to find out more details about the servlet's behavior.
 {note}</p>
 <p>{note:title=Trailing star in the :applyTo parameter}
 This applies to operations that use this parameter, since version 2.1.2 of the <em>org.apache.sling.servlets.post</em> bundle: If the last segment of the <code>:applyTo</code> value is '*' then the operation applies to all the children of the resolved parent resource. This can be used to act on all the children 
@@ -220,7 +229,7 @@ of a resource without having to specify 
 <li>Otherwise the resource path is used as the path and name of the new item.</li>
 </ul>
 <p>In both cases the path may still include selectors and extensions, which are cut off the path before finding out, what to do.</p>
-<p>To illustrate this algorithm, lets look at some examples (and check the <code>[PostServletCreateTest]()</code> in case of doubt):</p>
+<p>To illustrate this algorithm, lets look at some examples (and check the <a href="https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletCreateTest.java"><code>PostServletCreateTest</code></a> in case of doubt):</p>
 <table>
 <thead>
 <tr>
@@ -262,94 +271,79 @@ of a resource without having to specify 
 <h5 id="setting-property-values">Setting Property Values</h5>
 <p>Setting property values is as simple as just adding a request parameter whose name is the name of the property to be set and whose value is the value to be assigned to the property. We already saw how to do this in the quick start examples above.</p>
 <p>Here is another example show a simple HTML form to create a new node with an automatically created name:</p>
-<p>{code:html}
-<form method="POST" action="/content/page/first" enctype="multipart/form-data">
-    <input type="text" name="title" />
-    <input type="text" name="text" />
-    <input type="Submit" />
-</form></p>
-<div class="codehilite"><pre><span class="n">If</span> <span class="n">this</span> <span class="n">form</span> <span class="n">is</span> <span class="n">submitted</span> <span class="n">with</span> <span class="n">_title_</span> <span class="ow">and</span> <span class="n">_This</span> <span class="n">is</span> <span class="n">some</span> <span class="n">Text_</span> <span class="n">as</span> <span class="nb">values</span> <span class="k">for</span> <span class="n">the</span>  <span class="ow">and</span>  <span class="n">fields</span><span class="p">,</span> <span class="n">resp</span><span class="o">.</span><span class="p">,</span> <span class="n">a</span> <span class="k">new</span> <span class="n">node</span> <span class="n">is</span> <span class="n">created</span> <span class="n">at</span> <span class="n">the</span> <span class="n">path</span>  <span class="ow">and</span> <span class="n">the</span>  <span class="ow">and</span>  <span class="n">properties</span> <span class
 ="n">set</span> <span class="n">to</span> <span class="n">the</span> <span class="n">respective</span> <span class="n">field</span> <span class="nb">values</span><span class="o">.</span> <span class="n">If</span> <span class="n">a</span> <span class="n">node</span> <span class="n">at</span>  <span class="n">already</span> <span class="n">existed</span> <span class="n">before</span> <span class="n">submitting</span> <span class="n">the</span> <span class="n">form</span><span class="p">,</span> <span class="n">the</span>  <span class="ow">and</span>  <span class="n">properties</span> <span class="n">are</span> <span class="n">just</span> <span class="n">updated</span> <span class="n">to</span> <span class="n">the</span> <span class="k">new</span> <span class="nb">values</span> <span class="n">from</span> <span class="n">the</span> <span class="n">form</span> <span class="n">fields</span><span class="o">.</span>
-
-<span class="n">If</span> <span class="n">a</span> <span class="n">parameter</span> <span class="n">has</span> <span class="n">multiple</span> <span class="nb">values</span><span class="p">,</span> <span class="n">the</span> <span class="n">respective</span> <span class="n">property</span> <span class="n">will</span> <span class="n">be</span> <span class="n">created</span> <span class="n">as</span> <span class="n">a</span> <span class="n">multi</span><span class="o">-</span><span class="n">value</span> <span class="n">property</span><span class="o">.</span> <span class="n">So</span> <span class="k">for</span> <span class="n">example</span> <span class="n">the</span> <span class="n">command</span> <span class="n">line:</span>
-
-<span class="p">{</span><span class="n">noformat</span><span class="p">}</span>
-<span class="nv">$</span> <span class="nv">curl</span> <span class="o">-</span><span class="n">Fmulti</span><span class="o">=</span><span class="n">one</span> <span class="o">-</span><span class="n">Fmulti</span><span class="o">=</span><span class="n">two</span> <span class="n">http:</span><span class="sr">//</span><span class="n">host</span><span class="sr">/content/</span><span class="n">page</span>
-<span class="p">{</span><span class="n">noformat</span><span class="p">}</span>
-
-<span class="n">Would</span> <span class="n">assign</span> <span class="n">the</span>  <span class="n">property</span> <span class="n">the</span> <span class="n">value</span> <span class="n">_</span><span class="p">[</span> <span class="s">&quot;one&quot;</span><span class="p">,</span> <span class="s">&quot;two&quot;</span> <span class="p">]</span><span class="n">_</span><span class="o">.</span>
-
-<span class="n">This</span> <span class="n">is</span> <span class="n">pretty</span> <span class="n">much</span> <span class="n">all</span> <span class="n">there</span> <span class="n">is</span> <span class="n">to</span> <span class="n">know</span> <span class="n">about</span> <span class="n">creating</span> <span class="ow">and</span> <span class="n">modifying</span> <span class="n">content</span><span class="o">.</span> <span class="n">The</span> <span class="n">following</span> <span class="n">sections</span> <span class="n">will</span> <span class="n">now</span> <span class="n">introduce</span> <span class="n">more</span> <span class="n">functionality</span> <span class="n">which</span> <span class="n">help</span> <span class="n">you</span> <span class="n">with</span> <span class="n">more</span> <span class="n">fine</span><span class="o">-</span><span class="n">grained</span> <span class="n">control</span> <span class="n">in</span> <span class="n">your</span> <span class=
 "n">content</span> <span class="n">management</span> <span class="n">application</span><span class="o">.</span>
-
-<span class="n">h5</span><span class="o">.</span> <span class="n">File</span> <span class="n">Uploads</span>
-
-<span class="n">File</span> <span class="n">uploads</span> <span class="n">are</span> <span class="n">typically</span> <span class="n">done</span> <span class="n">using</span> <span class="n">the</span>  <span class="n">element</span> <span class="n">of</span> <span class="n">an</span> <span class="n">HTML</span> <span class="n">form</span> <span class="ow">and</span> <span class="n">ensuring</span> <span class="n">the</span> <span class="n">correct</span> <span class="n">form</span> <span class="n">encoding</span><span class="o">.</span> <span class="n">The</span> <span class="n">SlingPostServlet</span> <span class="n">handles</span> <span class="n">uploaded</span> <span class="n">files</span> <span class="n">specially</span><span class="p">,</span> <span class="n">in</span> <span class="n">that</span> <span class="n">the</span> <span class="n">file</span> <span class="n">data</span> <span class="n">is</span> <span class="ow">not</span> <span class="n">simply</span> <span c
 lass="n">written</span> <span class="n">into</span> <span class="n">a</span> <span class="n">property</span><span class="p">,</span> <span class="n">but</span> <span class="n">a</span> <span class="n">node</span> <span class="n">is</span> <span class="n">actually</span> <span class="n">created</span> <span class="n">with</span> <span class="n">three</span> <span class="n">properties:</span>
-
-   <span class="o">*</span>  <span class="o">--</span> <span class="n">The</span> <span class="n">actual</span> <span class="n">file</span> <span class="n">contents</span>
-   <span class="o">*</span>  <span class="o">--</span> <span class="n">The</span> <span class="nb">time</span> <span class="n">stamp</span> <span class="n">of</span> <span class="n">processing</span> <span class="n">the</span> <span class="n">uploaded</span> <span class="n">file</span>
-   <span class="o">*</span>  <span class="o">--</span> <span class="n">The</span> <span class="n">MIME</span> <span class="n">type</span> <span class="n">from</span> <span class="n">the</span> <span class="n">original</span> <span class="n">file</span> <span class="n">submission</span> <span class="p">(</span><span class="k">if</span> <span class="n">contained</span> <span class="n">in</span> <span class="n">the</span> <span class="n">file</span> <span class="n">body</span> <span class="n">part</span><span class="p">)</span> <span class="ow">or</span> <span class="n">derived</span> <span class="n">from</span> <span class="n">the</span> <span class="n">original</span> <span class="n">file</span> <span class="n">name</span>
-
-<span class="n">The</span> <span class="n">name</span> <span class="n">of</span> <span class="n">the</span> <span class="n">node</span> <span class="n">is</span> <span class="n">either</span> <span class="n">taken</span> <span class="n">from</span> <span class="n">the</span> <span class="n">parameter</span> <span class="n">name</span> <span class="ow">or</span> <span class="k">if</span> <span class="n">the</span> <span class="n">name</span> <span class="n">is</span>  <span class="n">from</span> <span class="n">the</span> <span class="n">name</span> <span class="n">of</span> <span class="n">the</span> <span class="n">uploaded</span> <span class="n">file</span><span class="o">.</span>
-
-<span class="n">The</span> <span class="n">primary</span> <span class="n">node</span> <span class="n">type</span> <span class="n">of</span> <span class="n">the</span> <span class="n">uploaded</span> <span class="n">file</span> <span class="n">is</span> <span class="n">selected</span> <span class="n">using</span> <span class="n">the</span> <span class="n">following</span> <span class="n">algorithm:</span>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;title&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;text&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;Submit&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
+</pre></div>
 
-   <span class="c1"># If a  suffixed parameter (see below for a description) is present check whether the value is a known non-mixin node type. If so, the node is created with this primary node type.</span>
-   <span class="c1"># If a  suffixed parameter is not present or the value does not denote an existing non-mixin node type, the node will be created as an  node if the parent node is of type . Otherwise the node will be created with primary node type .</span>
 
-<span class="n">If</span> <span class="n">the</span> <span class="n">node</span> <span class="n">to</span> <span class="n">be</span> <span class="n">created</span> <span class="n">is</span> <span class="p">,</span> <span class="n">the</span> <span class="n">actual</span> <span class="n">file</span> <span class="n">data</span> <span class="n">will</span> <span class="n">really</span> <span class="n">be</span> <span class="n">stored</span> <span class="n">in</span> <span class="n">the</span>  <span class="n">child</span> <span class="n">node</span> <span class="n">of</span> <span class="n">the</span> <span class="k">new</span>  <span class="n">node</span> <span class="n">whose</span> <span class="n">primary</span> <span class="n">node</span> <span class="n">type</span> <span class="n">is</span> <span class="k">then</span> <span class="n">set</span> <span class="n">as</span> <span class="o">.</span>
+<p>If this form is submitted with <em>title</em> and <em>This is some Text</em> as values for the <code>title</code> and <code>text</code> fields, resp., a new node is created at the path <code>/content/page/first</code> and the <code>title</code> and <code>text</code> properties set to the respective field values. If a node at <code>/content/page/first</code> already existed before submitting the form, the <code>title</code> and <code>text</code> properties are just updated to the new values from the form fields.</p>
+<p>If a parameter has multiple values, the respective property will be created as a multi-value property. So for example the command line:</p>
+<div class="codehilite"><pre><span class="nv">$</span> <span class="nv">curl</span> <span class="o">-</span><span class="n">Fmulti</span><span class="o">=</span><span class="n">one</span> <span class="o">-</span><span class="n">Fmulti</span><span class="o">=</span><span class="n">two</span> <span class="n">http:</span><span class="sr">//</span><span class="n">host</span><span class="sr">/content/</span><span class="n">page</span>
+</pre></div>
 
-<span class="n">Example</span> <span class="mi">1</span><span class="p">:</span> <span class="n">Upload</span> <span class="n">an</span> <span class="n">image</span> <span class="n">to</span> <span class="n">a</span> <span class="n">node</span> <span class="n">named</span>  <span class="n">below</span> <span class="p">:</span>
 
-<span class="p">{</span><span class="n">code:html</span><span class="p">}</span>
-<span class="o">&lt;</span><span class="n">form</span> <span class="n">method</span><span class="o">=</span><span class="s">&quot;POST&quot;</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;/content/page&quot;</span> <span class="n">enctype</span><span class="o">=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="o">&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;file&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;image&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;Submit&quot;</span> <span class="o">/&gt;</span>
-<span class="sr">&lt;/form&gt;</span>
+<p>Would assign the <code>/content/page/multi</code> property the value <em>[ "one", "two" ]</em>.</p>
+<p>This is pretty much all there is to know about creating and modifying content. The following sections will now introduce more functionality which help you with more fine-grained control in your content management application.</p>
+<h5 id="file-uploads">File Uploads</h5>
+<p>File uploads are typically done using the <code>&lt;input type="file""/&gt;</code> element of an HTML form and ensuring the correct form encoding. The SlingPostServlet handles uploaded files specially, in that the file data is not simply written into a property, but a node is actually created with three properties:</p>
+<ul>
+<li><code>jcr:data</code> -- The actual file contents</li>
+<li><code>jcr:lastModified</code> -- The time stamp of processing the uploaded file</li>
+<li><code>jcr:mimeType</code> -- The MIME type from the original file submission (if contained in the file body part) or derived from the original file name</li>
+</ul>
+<p>The name of the node is either taken from the parameter name or if the name is <code>*</code> from the name of the uploaded file.</p>
+<p>The primary node type of the uploaded file is selected using the following algorithm:</p>
+<ul>
+<li>If a `@TypeHint suffixed parameter (see below for a description) is present check whether the value is a known non-mixin node type. If so, the node is created with this primary node type.</li>
+<li>If a <code>@TypeHint</code> suffixed parameter is not present or the value does not denote an existing non-mixin node type, the node will be created as an <code>nt:file</code> node if the parent node is of type <code>nt:folder</code>. Otherwise the node will be created with primary node type <code>nt:resource</code>.</li>
+</ul>
+<p>If the node to be created is <code>nt:file</code>, the actual file data will really be stored in the <code>jcr:content</code> child node of the new <code>nt:file</code> node whose primary node type is then set as <code>nt:resource</code>.</p>
+<p>Example 1: Upload an image to a node named <code>image</code> below <code>/content/page</code>:</p>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;file&quot;</span> <span class="na">name=</span><span class="s">&quot;image&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;Submit&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
 </pre></div>
 
 
 <p>Example 2: Upload a file as a node of type <code>nt:file</code> below <code>/content/folder</code>:</p>
-<p>{code:html}
-<form method="POST" action="/content/page" enctype="multipart/form-data">
-    <input type="file" name="*" />
-    <input type="hidden" name="*@TypeHint" value="nt:file" />
-    <input type="Submit" />
-</form></p>
-<div class="codehilite"><pre><span class="n">Assuming</span> <span class="n">the</span> <span class="n">user</span> <span class="n">selected</span> <span class="n">a</span> <span class="n">file</span> <span class="n">named</span>  <span class="n">the</span> <span class="n">uploaded</span> <span class="n">file</span> <span class="n">would</span> <span class="n">be</span> <span class="n">stored</span> <span class="n">in</span> <span class="n">an</span>  <span class="n">node</span> <span class="n">at</span> <span class="o">.</span>
-
-<span class="n">h5</span><span class="o">.</span> <span class="n">Date</span> <span class="n">properties</span>
-
-<span class="n">Parameters</span> <span class="n">providing</span> <span class="n">date</span><span class="sr">/time values to be stored in JCR properties of type _Date_ require special handling. The problem is that there are a number of formats to represent such date/</span><span class="nb">time</span> <span class="nb">values</span><span class="o">.</span> <span class="n">To</span> <span class="n">account</span> <span class="k">for</span> <span class="n">this</span> <span class="nb">open</span><span class="o">-</span><span class="n">ended</span> <span class="n">list</span> <span class="n">of</span> <span class="n">formats</span><span class="p">,</span> <span class="n">the</span> <span class="n">Sling</span> <span class="n">Post</span> <span class="n">Servlet</span> <span class="n">supports</span> <span class="n">configurability</span> <span class="n">of</span> <span class="n">the</span> <span class="n">process</span> <span class="n">of</span> <span class="n">parsing</span> 
 <span class="n">strings</span> <span class="n">into</span>  <span class="n">objects</span><span class="o">.</span>
-
-<span class="n">The</span> <span class="n">Sling</span> <span class="n">Post</span> <span class="n">Servlet</span> <span class="n">configuration</span> <span class="n">property</span>  <span class="n">takes</span> <span class="n">a</span> <span class="n">list</span> <span class="n">of</span> <span class="nb">format</span> <span class="n">strings</span> <span class="n">which</span> <span class="n">are</span> <span class="n">used</span> <span class="n">to</span> <span class="n">setup</span>  <span class="n">instances</span> <span class="k">for</span> <span class="n">parsing</span> <span class="n">date</span><span class="o">/</span><span class="nb">time</span> <span class="n">string</span> <span class="n">representations</span><span class="o">.</span> <span class="n">A</span> <span class="n">special</span> <span class="nb">format</span> <span class="n">string</span>  <span class="n">is</span> <span class="n">supported</span> <span class="n">to</span> <span class="n">indicate</s
 pan> <span class="n">the</span> <span class="n">string</span> <span class="n">to</span> <span class="n">be</span> <span class="n">parsed</span> <span class="n">as</span> <span class="n">a</span> <span class="n">JCR</span> <span class="n">standard</span> <span class="n">string</span> <span class="n">representation</span> <span class="n">of</span> <span class="n">a</span> <span class="n">_Date_</span> <span class="n">property</span><span class="o">.</span>
-
-<span class="n">The</span> <span class="n">default</span> <span class="n">list</span> <span class="n">of</span> <span class="n">configured</span> <span class="n">date</span><span class="o">/</span><span class="nb">time</span> <span class="n">parse</span> <span class="n">pattern</span> <span class="n">is</span> <span class="p">:</span>
-
-  <span class="o">*</span> <span class="n">EEE</span> <span class="n">MMM</span> <span class="n">dd</span> <span class="n">yyyy</span> <span class="n">HH:mm:ss</span> <span class="s">&#39;GMT&#39;</span><span class="n">Z</span>
-  <span class="o">*</span> <span class="n">ISO8601</span>
-  <span class="o">*</span> <span class="n">yyyy</span><span class="o">-</span><span class="n">MM</span><span class="o">-</span><span class="n">dd</span><span class="s">&#39;T&#39;</span><span class="n">HH:mm:ss</span><span class="o">.</span><span class="n">SSSZ</span>
-  <span class="o">*</span> <span class="n">yyyy</span><span class="o">-</span><span class="n">MM</span><span class="o">-</span><span class="n">dd</span><span class="s">&#39;T&#39;</span><span class="n">HH:mm:ss</span>
-  <span class="o">*</span> <span class="n">yyyy</span><span class="o">-</span><span class="n">MM</span><span class="o">-</span><span class="n">dd</span>
-  <span class="o">*</span> <span class="n">dd</span><span class="o">.</span><span class="n">MM</span><span class="o">.</span><span class="n">yyyy</span> <span class="n">HH:mm:ss</span>
-  <span class="o">*</span> <span class="n">dd</span><span class="o">.</span><span class="n">MM</span><span class="o">.</span><span class="n">yyyy</span>
-
-<span class="n">Any</span> <span class="n">date</span><span class="o">/</span><span class="nb">time</span> <span class="n">string</span> <span class="n">parameter</span> <span class="n">supplied</span> <span class="n">is</span> <span class="n">subject</span> <span class="n">to</span> <span class="n">the</span> <span class="n">patterns</span> <span class="n">in</span> <span class="n">the</span> <span class="n">configured</span> <span class="n">order</span><span class="o">.</span> <span class="n">The</span> <span class="n">first</span> <span class="n">pattern</span> <span class="n">accepting</span> <span class="n">the</span> <span class="n">string</span> <span class="ow">and</span> <span class="n">parsing</span> <span class="n">it</span> <span class="n">into</span> <span class="n">a</span>  <span class="o">--</span> <span class="ow">and</span> <span class="n">thus</span> <span class="n">a</span>  <span class="o">--</span> <span class="n">object</span> <span class="n">is</span>
  <span class="n">used</span><span class="o">.</span> <span class="n">Therefore</span> <span class="n">this</span> <span class="n">list</span> <span class="n">is</span> <span class="n">best</span> <span class="n">ordered</span> <span class="n">in</span> <span class="n">a</span> <span class="n">most</span><span class="o">-</span><span class="n">stringent</span> <span class="n">to</span> <span class="n">least</span><span class="o">-</span><span class="n">stringent</span> <span class="n">order</span><span class="o">.</span>
-
-<span class="n">h5</span><span class="o">.</span> <span class="n">Omitting</span> <span class="n">Some</span> <span class="n">Parameters</span>
-
-<span class="n">There</span> <span class="n">may</span> <span class="n">be</span> <span class="nb">times</span><span class="p">,</span> <span class="n">that</span> <span class="n">you</span> <span class="n">have</span> <span class="n">forms</span> <span class="n">which</span> <span class="n">contain</span> <span class="n">a</span> <span class="n">lot</span> <span class="n">of</span> <span class="n">fields</span><span class="p">,</span> <span class="n">which</span> <span class="n">you</span> <span class="k">do</span> <span class="ow">not</span> <span class="n">want</span> <span class="n">to</span> <span class="n">actually</span> <span class="n">store</span> <span class="n">in</span> <span class="n">content</span><span class="o">.</span> <span class="n">Such</span> <span class="n">forms</span> <span class="n">usually</span> <span class="n">are</span> <span class="n">created</span> <span class="n">using</span> <span class="n">some</span> <span class="n">client</span><span class
 ="o">-</span><span class="n">side</span> <span class="n">GUI</span> <span class="n">library</span> <span class="n">which</span> <span class="n">uses</span> <span class="n">the</span> <span class="n">fields</span> <span class="k">for</span> <span class="n">its</span> <span class="n">own</span> <span class="n">purposes</span><span class="o">.</span> <span class="n">To</span> <span class="n">be</span> <span class="n">able</span> <span class="n">to</span> <span class="n">easily</span> <span class="n">differentiate</span> <span class="n">between</span> <span class="n">real</span> <span class="n">content</span> <span class="n">to</span> <span class="n">be</span> <span class="n">actually</span> <span class="n">stored</span> <span class="ow">and</span> <span class="n">such</span> <span class="n">control</span> <span class="n">parameters</span><span class="p">,</span> <span class="n">you</span> <span class="n">may</span> <span class="n">prefix</span> <span class="n">the</span> <span 
 class="n">names</span> <span class="n">of</span> <span class="n">the</span> <span class="n">fields</span> <span class="n">destined</span> <span class="k">for</span> <span class="n">content</span> <span class="n">with</span> <span class="n">a</span> <span class="n">dot</span><span class="o">-</span><span class="n">slash</span> <span class="p">()</span><span class="o">.</span>
-
-<span class="n">As</span> <span class="n">soon</span> <span class="n">as</span> <span class="n">the</span> <span class="n">SlingPostServlet</span> <span class="n">encounters</span> <span class="n">parameters</span> <span class="n">prefixed</span> <span class="n">with</span> <span class="n">dot</span><span class="o">-</span><span class="n">slash</span><span class="p">,</span> <span class="n">only</span> <span class="n">those</span> <span class="n">parameters</span> <span class="n">are</span> <span class="n">considered</span> <span class="k">for</span> <span class="n">content</span> <span class="n">updates</span> <span class="k">while</span> <span class="n">all</span> <span class="n">other</span> <span class="n">parameters</span> <span class="ow">not</span> <span class="n">prefixed</span> <span class="n">are</span> <span class="n">just</span> <span class="n">ignored</span><span class="o">.</span> <span class="n">In</span> <span class="n">addition</span> <span class="n">to</spa
 n> <span class="n">dot</span><span class="o">-</span><span class="n">slash</span> <span class="n">prefixed</span> <span class="n">parameters</span><span class="p">,</span> <span class="n">also</span> <span class="n">parameters</span> <span class="n">prefixed</span> <span class="n">with</span> <span class="n">dot</span><span class="o">-</span><span class="n">dot</span><span class="o">-</span><span class="n">slash</span> <span class="p">()</span> <span class="ow">and</span> <span class="n">slash</span> <span class="p">()</span> <span class="n">are</span> <span class="n">considered</span> <span class="n">in</span> <span class="n">this</span> <span class="n">situation</span><span class="o">.</span>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;file&quot;</span> <span class="na">name=</span><span class="s">&quot;*&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;*@TypeHint&quot;</span> <span class="na">value=</span><span class="s">&quot;nt:file&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;Submit&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
+</pre></div>
 
-<span class="n">For</span> <span class="n">example</span><span class="p">,</span> <span class="n">the</span> <span class="n">following</span> <span class="n">form</span> <span class="n">only</span> <span class="n">uses</span> <span class="n">the</span> <span class="n">first</span> <span class="n">two</span> <span class="n">fields</span> <span class="k">for</span> <span class="n">content</span> <span class="n">update</span> <span class="ow">and</span> <span class="n">ignores</span> <span class="n">the</span> <span class="n">rest:</span>
 
-<span class="p">{</span><span class="n">code:html</span><span class="p">}</span>
-<span class="o">&lt;</span><span class="n">form</span> <span class="n">method</span><span class="o">=</span><span class="s">&quot;POST&quot;</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="n">enctype</span><span class="o">=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="o">&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;./title&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;../first/text&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;control0&quot;</span> <span class="o">/&gt;&lt;!--</span> <span class="n">ignored</span> <span class="o">--&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;control1&quot;</span> <span class="o">/&gt;&lt;!--</span> <span class="n">ignored</span> <span class="o">--&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;Submit&quot;</span> <span class="o">/&gt;</span>
-<span class="sr">&lt;/form&gt;</span>
+<p>Assuming the user selected a file named <code>myImage.jpg</code> the uploaded file would be stored in an <code>nt:file</code> node at <code>/content/folder/myImage.jpg</code>.</p>
+<h5 id="date-properties">Date properties</h5>
+<p>Parameters providing date/time values to be stored in JCR properties of type <em>Date</em> require special handling. The problem is that there are a number of formats to represent such date/time values. To account for this open-ended list of formats, the Sling Post Servlet supports configurability of the process of parsing strings into <code>Calendar</code> objects.</p>
+<p>The Sling Post Servlet configuration property <code>servlet.post.dateFormats</code> takes a list of format strings which are used to setup <code>java.text.SimpleDateFormat</code> instances for parsing date/time string representations. A special format string <code>ISO8601</code> is supported to indicate the string to be parsed as a JCR standard string representation of a <em>Date</em> property.</p>
+<p>The default list of configured date/time parse pattern is :</p>
+<ul>
+<li>EEE MMM dd yyyy HH:mm:ss 'GMT'Z</li>
+<li>ISO8601</li>
+<li>yyyy-MM-dd'T'HH:mm:ss.SSSZ</li>
+<li>yyyy-MM-dd'T'HH:mm:ss</li>
+<li>yyyy-MM-dd</li>
+<li>dd.MM.yyyy HH:mm:ss</li>
+<li>dd.MM.yyyy</li>
+</ul>
+<p>Any date/time string parameter supplied is subject to the patterns in the configured order. The first pattern accepting the string and parsing it into a <code>Date</code> -- and thus a <code>Calendar</code> -- object is used. Therefore this list is best ordered in a most-stringent to least-stringent order.</p>
+<h5 id="omitting-some-parameters">Omitting Some Parameters</h5>
+<p>There may be times, that you have forms which contain a lot of fields, which you do not want to actually store in content. Such forms usually are created using some client-side GUI library which uses the fields for its own purposes. To be able to easily differentiate between real content to be actually stored and such control parameters, you may prefix the names of the fields destined for content with a dot-slash (<code>./</code>).</p>
+<p>As soon as the SlingPostServlet encounters parameters prefixed with dot-slash, only those parameters are considered for content updates while all other parameters not prefixed are just ignored. In addition to dot-slash prefixed parameters, also parameters prefixed with dot-dot-slash (<code>../</code>) and slash (<code>/</code>) are considered in this situation.</p>
+<p>For example, the following form only uses the first two fields for content update and ignores the rest:</p>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;./title&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;../first/text&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;control0&quot;</span> <span class="nt">/&gt;</span><span class="c">&lt;!-- ignored --&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;control1&quot;</span> <span class="nt">/&gt;</span><span class="c">&lt;!-- ignored --&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;Submit&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
 </pre></div>
 
 
@@ -358,8 +352,8 @@ of a resource without having to specify 
 <p>In addition to the mechanism explained here, the following parameters are also ignored:</p>
 <ul>
 <li>Parameters whose name start with a colon (<code>:</code>) are always ignored by the SlingPostServlet with respect to content update. The reason is that the prefixing colon is intended as a marker for SlingPostServlet control parameters.</li>
-<li>The <code>\*charset\*</code> request parameter is also never written back because this parameter is used to convey the character encoding used to transport the request parameters.</li>
-<li>Request parameters matching a regular expression supplied with the <code>servlet.post.ignorePattern</code> configuration parameter are also ignored. By default this pattern is <code>j*.*</code> thus ignoring any request parameters with the prefix <code>j*</code> such as <code>j_username</code>. Those request parameters are generally used for authentication purposes and may hit the Sling POST Servlet in some situations.</li>
+<li>The <code>charset</code> request parameter is also never written back because this parameter is used to convey the character encoding used to transport the request parameters.</li>
+<li>Request parameters matching a regular expression supplied with the <code>servlet.post.ignorePattern</code> configuration parameter are also ignored. By default this pattern is <code>j_.*</code> thus ignoring any request parameters with the prefix <code>j_</code> such as <code>j_username</code>. Those request parameters are generally used for authentication purposes and may hit the Sling POST Servlet in some situations.</li>
 </ul>
 <h5 id="controlling-content-updates-with-suffixes">Controlling Content Updates with <code>@</code> Suffixes</h5>
 <p>Generally just creating forms with parameters and their values suffices it completely. Sometimes, though, you want to have more control on how the parameter values are actually stored in the properties. For example, you want to set a property to a default value if the user did provide an actual value. Or you might want to store a parameter explicitly with a given data type, such as numeric, boolean etc.</p>
@@ -368,55 +362,49 @@ of a resource without having to specify 
 <p>For example, the parameter <code>width@TypeHint</code> applies to the <code>width</code> parameter and the <code>./height@TypeHint</code> parameter applies to the <code>./height</code> parameter. As can be seen, the correlation between the parameters is a simple case-sensitive string comparison. That is the <code>widht@TypeHint</code> parameter would not apply to the <code>./width</code> even though both parameters address the same property but they do not have a string match.</p>
 <h6 id="typehint"><code>@TypeHint</code></h6>
 <p>Parameters with the <code>@TypeHint</code> suffix may be used to force storing the named parameter in a property with the given type. The value of the <code>@TypeHint</code> parameter, if applied to a parameter for a property, is the JCR property type name. If the <code>@TypeHint</code> parameter is applied to a field upload parameter, the value is used to indicate the JCR primary node type for the node into which the uploaded file is stored.</p>
-<p>If the <code>@TypeHint</code> ends with "<a href=""></a>", it indicates a multi-value property. A multi-value property is usually auto-detected if there are mutliple values for the property (ie. request parameter). But if only a single value is present in the request, the desired property type needs to be explicitly defined as multi-value by stating <code>@TypeHint=&lt;type&gt;[]</code>.</p>
+<p>If the <code>@TypeHint</code> value ends with <code>[]</code>, it indicates a multi-value property. A multi-value property is usually auto-detected if there are mutliple values for the property (ie. request parameter). But if only a single value is present in the request, the desired property type needs to be explicitly defined as multi-value by stating <code>@TypeHint=&lt;type&gt;[]</code>.</p>
 <p>Example: The following form sets the numeric <code>width</code>, the boolean <code>checked</code>, and the multi-valued <code>hobbys</code> (with 3 values to enter) properties:</p>
-<p>{code:html}
-<form method="POST" action="/content/page/first" enctype="multipart/form-data">
-    <input type="text" name="width" />
-    <input type="hidden" name="width@TypeHint" value="Long" />
-    <input type="checkbox" name="checked" />
-    <input type="hidden" name="checked@TypeHint" value="Boolean" />
-    <input type="text" name="hobbys"/>
-    <input type="text" name="hobbys"/>
-    <input type="text" name="hobbys"/>
-    <input type="hidden" name="hobbys@TypeHint" value="String<a href=""></a>" />
-    <input type="Submit" />
-</form></p>
-<div class="codehilite"><pre><span class="n">In</span> <span class="n">real</span> <span class="n">applications</span> <span class="n">you</span> <span class="n">would</span> <span class="n">need</span> <span class="n">some</span> <span class="n">javascript</span> <span class="n">that</span> <span class="n">allows</span> <span class="n">to</span> <span class="n">add</span><span class="sr">/remove values, ie. add/</span><span class="n">remove</span> <span class="n">inputs</span> <span class="n">with</span> <span class="n">the</span> <span class="n">name</span> <span class="s">&quot;hobbys&quot;</span><span class="o">.</span> <span class="n">Or</span> <span class="n">a</span> <span class="n">pure</span> <span class="n">javascript</span> <span class="n">based</span> <span class="n">form</span> <span class="n">post</span> <span class="n">would</span> <span class="n">be</span> <span class="n">used</span><span class="p">,</span> <span class="n">that</span> <span class="n">gathers<
 /span> <span class="n">the</span> <span class="n">properties</span> <span class="n">to</span> <span class="n">update</span> <span class="n">programmatically</span><span class="p">,</span> <span class="n">but</span> <span class="n">the</span> <span class="n">additional</span> <span class="n">parameter</span>  <span class="n">would</span> <span class="n">be</span> <span class="n">the</span> <span class="n">same</span><span class="o">.</span>
-
-<span class="n">The</span>  <span class="n">suffixed</span> <span class="n">parameter</span> <span class="n">is</span> <span class="n">assumed</span> <span class="n">to</span> <span class="n">be</span> <span class="n">single</span><span class="o">-</span><span class="n">valued</span><span class="o">.</span> <span class="n">If</span> <span class="n">the</span> <span class="n">parameter</span> <span class="n">has</span> <span class="n">multiple</span> <span class="nb">values</span><span class="p">,</span> <span class="n">only</span> <span class="n">the</span> <span class="n">first</span> <span class="n">is</span> <span class="n">actually</span> <span class="n">used</span><span class="o">.</span>
-
-<span class="n">For</span> <span class="n">more</span> <span class="n">information</span> <span class="n">on</span> <span class="n">applying</span>  <span class="n">to</span> <span class="n">a</span> <span class="n">file</span> <span class="n">upload</span> <span class="n">parameter</span> <span class="n">see</span> <span class="n">the</span> <span class="n">section</span> <span class="n">on</span> <span class="n">File</span> <span class="n">Uploads</span> <span class="n">above</span><span class="o">.</span>
-
-<span class="n">h6</span><span class="o">.</span>
-
-<span class="n">The</span>  <span class="n">suffixed</span> <span class="n">parameter</span> <span class="n">may</span> <span class="n">be</span> <span class="n">provided</span> <span class="n">to</span> <span class="n">set</span> <span class="n">a</span> <span class="n">property</span> <span class="n">to</span> <span class="n">a</span> <span class="n">default</span> <span class="n">value</span> <span class="n">should</span> <span class="nb">no</span> <span class="n">value</span> <span class="n">be</span> <span class="n">provided</span> <span class="n">in</span> <span class="n">the</span> <span class="n">actual</span> <span class="n">parameters</span><span class="o">.</span> <span class="n">Same</span> <span class="n">as</span> <span class="k">for</span> <span class="n">normal</span> <span class="n">parameters</span><span class="p">,</span> <span class="n">the</span>  <span class="n">parameter</span> <span class="n">may</span> <span class="n">have</span> <span class="n">mult
 iple</span> <span class="nb">values</span> <span class="n">to</span> <span class="n">create</span> <span class="n">multi</span><span class="o">-</span><span class="n">valued</span> <span class="n">properties</span><span class="o">.</span>
-
-<span class="n">Example:</span> <span class="n">Set</span> <span class="n">the</span>  <span class="n">property</span> <span class="n">to</span> <span class="n">a</span> <span class="n">default</span> <span class="n">value</span> <span class="k">if</span> <span class="n">the</span> <span class="n">user</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">provide</span> <span class="n">one:</span>
-
-<span class="p">{</span><span class="n">code:html</span><span class="p">}</span>
-<span class="o">&lt;</span><span class="n">form</span> <span class="n">method</span><span class="o">=</span><span class="s">&quot;POST&quot;</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="n">enctype</span><span class="o">=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="o">&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;text@DefaultValue&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;--- Default Value ---&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;Submit&quot;</span> <span class="o">/&gt;</span>
-<span class="sr">&lt;/form&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;width&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;width@TypeHint&quot;</span> <span class="na">value=</span><span class="s">&quot;Long&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">name=</span><span class="s">&quot;checked&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;checked@TypeHint&quot;</span> <span class="na">value=</span><span class="s">&quot;Boolean&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;hobbys&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;hobbys&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;hobbys&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;hobbys@TypeHint&quot;</span> <span class="na">value=</span><span class="s">&quot;String[]&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;Submit&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
+</pre></div>
+
+
+<p>In real applications you would need some javascript that allows to add/remove values, ie. add/remove inputs with the name "hobbys". Or a pure javascript based form post would be used, that gathers the properties to update programmatically, but the additional parameter <code>hobbys@TypeHint=String[]</code> would be the same.</p>
+<p>The <code>@TypeHint</code> suffixed parameter is assumed to be single-valued. If the parameter has multiple values, only the first is actually used.</p>
+<p>For more information on applying <code>@TypeHint</code> to a file upload parameter see the section on File Uploads above.</p>
+<h6 id="defaultvalue"><code>@DefaultValue</code></h6>
+<p>The <code>@DefaultValue</code> suffixed parameter may be provided to set a property to a default value should no value be provided in the actual parameters. Same as for normal parameters, the <code>@DefaultValue</code> parameter may have multiple values to create multi-valued properties.</p>
+<p>Example: Set the <code>text</code> property to a default value if the user does not provide one:</p>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;text&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;text@DefaultValue&quot;</span> <span class="na">value=</span><span class="s">&quot;--- Default Value ---&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;Submit&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
 </pre></div>
 
 
 <h6 id="usedefaultwhenmissing"><code>@UseDefaultWhenMissing</code></h6>
 <p>As described above, <code>@DefaultValue</code> only takes effect if no value is provided for a particular parameter. However, in some cases, such as HTML checkboxes, this isn't sufficient because the parameter isn't submitted at all. To handle this scenario, you can use the <code>@UseDefaultWhenMissing</code> suffixed parameter.</p>
-<p>{code:html}
-<form method="POST" action="/content/page/first" enctype="multipart/form-data">
-    <input name="queryIgnoreNoise" class="input" type="checkbox" value="true"/>
-    <input type="hidden" name="queryIgnoreNoise@DefaultValue" value="false"/> 
-    <input type="hidden" name="queryIgnoreNoise@UseDefaultWhenMissing" value="true"/>
-</form></p>
-<div class="codehilite"><pre>h6.
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">name=</span><span class="s">&quot;queryIgnoreNoise&quot;</span> <span class="na">class=</span><span class="s">&quot;input&quot;</span> <span class="na">type=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">value=</span><span class="s">&quot;true&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;queryIgnoreNoise@DefaultValue&quot;</span> <span class="na">value=</span><span class="s">&quot;false&quot;</span><span class="nt">/&gt;</span> 
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;queryIgnoreNoise@UseDefaultWhenMissing&quot;</span> <span class="na">value=</span><span class="s">&quot;true&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
+</pre></div>
 
-Sometimes a form client will supply empty parameter values resulting in content being created or modified. For example submitting this form:
 
-{code:html}
-<span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+<h6 id="ignoreblanks"><code>@IgnoreBlanks</code></h6>
+<p>Sometimes a form client will supply empty parameter values resulting in content being created or modified. For example submitting this form:</p>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
     <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;stringProperty@TypeHint&quot;</span> <span class="na">value=</span><span class="s">&quot;String[]&quot;</span><span class="nt">/&gt;</span>
     <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;stringProperty&quot;</span> <span class="na">value=</span><span class="s">&quot;foo&quot;</span><span class="nt">/&gt;</span>
     <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;stringProperty&quot;</span> <span class="na">value=</span><span class="s">&quot;bar&quot;</span><span class="nt">/&gt;</span>
@@ -425,56 +413,48 @@ Sometimes a form client will supply empt
 </pre></div>
 
 
-<p>will result in multi-value String property being set to <a href=""> "foo", "bar", "" </a>. Notice the blank value.</p>
+<p>will result in multi-value String property being set to [ "foo", "bar", "" ]. Notice the blank value.</p>
 <p>Likewise submitting this form without a value entered:</p>
-<p>{code:html}
-<form method="POST" action="/content/page/first" enctype="multipart/form-data">
-    <input type="hidden" name="stringProperty@TypeHint" value="String"/>
-    <input type="text" name="stringProperty" value=""/>
-</form></p>
-<div class="codehilite"><pre><span class="n">will</span> <span class="n">result</span> <span class="n">in</span> <span class="n">the</span> <span class="n">single</span><span class="o">-</span><span class="n">value</span> <span class="n">String</span> <span class="n">property</span> <span class="n">being</span> <span class="n">set</span> <span class="n">to</span> <span class="n">an</span> <span class="n">empty</span> <span class="n">string</span><span class="o">.</span>
-
-<span class="n">To</span> <span class="n">overcome</span> <span class="n">this</span> <span class="n">situation</span> <span class="n">the</span>  <span class="n">suffix</span> <span class="n">may</span> <span class="n">be</span> <span class="n">used</span> <span class="n">to</span> <span class="n">consider</span> <span class="n">parameters</span> <span class="n">with</span> <span class="n">an</span> <span class="n">empty</span> <span class="n">string</span> <span class="n">value</span> <span class="n">to</span> <span class="n">be</span> <span class="n">ignored</span> <span class="n">during</span> <span class="n">processing</span><span class="o">.</span> <span class="n">That</span> <span class="n">is</span> <span class="n">such</span> <span class="n">parameter</span> <span class="nb">values</span> <span class="n">would</span> <span class="n">be</span> <span class="n">treated</span> <span class="n">as</span> <span class="k">if</span> <span class="n">they</span> <span class="n
 ">would</span> <span class="ow">not</span> <span class="n">be</span> <span class="n">supplied</span><span class="o">.</span>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;stringProperty@TypeHint&quot;</span> <span class="na">value=</span><span class="s">&quot;String&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;stringProperty&quot;</span> <span class="na">value=</span><span class="s">&quot;&quot;</span><span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
+</pre></div>
 
-<span class="n">Adding</span>
 
-<span class="p">{</span><span class="n">code:html</span><span class="p">}</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;stringProperty@IgnoreBlanks&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
+<p>will result in the single-value String property being set to an empty string.</p>
+<p>To overcome this situation the <code>@IgnoreBlanks</code> suffix may be used to consider parameters with an empty string value to be ignored during processing. That is such parameter values would be treated as if they would not be supplied.</p>
+<p>Adding</p>
+<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;stringProperty@IgnoreBlanks&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;true&quot;</span><span class="o">/&gt;</span>
 </pre></div>
 
 
-<p>to the above forms will cause the multi-value property be set to the two-element value <a href=""> "foo", "bar" </a> and to not modify the property at all in the second single-value example.</p>
+<p>to the above forms will cause the multi-value property be set to the two-element value [ "foo", "bar" ] and to not modify the property at all in the second single-value example.</p>
 <h6 id="valuefrom"><code>@ValueFrom</code></h6>
 <p>In some situations, an HTML form with parameters may be reused to update content. But one or more form parameters may not comply with the names expected to be used for properties. In this case a parameter suffixed with <code>@ValueFrom</code> may be set containing the name of the parameter providing the actual data to be used.</p>
 <p>Example: To set the property <code>text</code> from a form element <code>supplied_text</code>, you might use the following form:</p>
-<p>{code:html}
-<form method="POST" action="/content/page/first" enctype="multipart/form-data">
-    <input type="text" name="supplied_text" />
-    <input type="hidden" name="./text@ValueFrom" value="supplied_text" />
-    <input type="Submit" />
-</form></p>
-<div class="codehilite"><pre><span class="n">To</span> <span class="n">prevent</span> <span class="n">storing</span> <span class="n">the</span> <span class="n">additional</span> <span class="n">paramaters</span> <span class="n">in</span> <span class="n">the</span> <span class="n">repository</span> <span class="n">you</span> <span class="n">might</span> <span class="n">want</span> <span class="n">to</span> <span class="k">use</span> <span class="n">the</span> <span class="n">prefixing</span> <span class="n">mechanism</span> <span class="n">as</span> <span class="n">shown</span> <span class="n">in</span> <span class="n">the</span> <span class="n">example</span> <span class="n">above</span><span class="p">,</span> <span class="n">where</span> <span class="n">the</span>  <span class="n">parameter</span> <span class="n">is</span> <span class="n">prefixed</span> <span class="ow">and</span> <span class="n">thus</span> <span class="n">the</span>  <span class="n">parameter</span> <sp
 an class="n">is</span> <span class="ow">not</span> <span class="n">used</span> <span class="k">for</span> <span class="n">property</span> <span class="n">setting</span><span class="o">.</span>
-
-<span class="n">The</span>  <span class="n">suffixed</span> <span class="n">parameter</span> <span class="n">is</span> <span class="n">assumed</span> <span class="n">to</span> <span class="n">be</span> <span class="n">single</span><span class="o">-</span><span class="n">valued</span><span class="o">.</span> <span class="n">If</span> <span class="n">the</span> <span class="n">parameter</span> <span class="n">has</span> <span class="n">multiple</span> <span class="nb">values</span> <span class="n">it</span> <span class="n">is</span> <span class="n">ignored</span> <span class="n">completely</span><span class="o">.</span>
-
-<span class="n">The</span>  <span class="n">suffixed</span> <span class="n">parameter</span> <span class="n">is</span> <span class="n">also</span> <span class="n">special</span> <span class="n">in</span> <span class="n">that</span> <span class="n">there</span> <span class="n">must</span> <span class="ow">not</span> <span class="n">be</span> <span class="n">a</span> <span class="n">correlated</span> <span class="n">parameter</span> <span class="n">without</span> <span class="n">a</span> <span class="n">suffix</span><span class="o">.</span> <span class="n">Thus</span> <span class="n">have</span> <span class="n">parameters</span>  <span class="ow">and</span>  <span class="n">may</span> <span class="n">have</span> <span class="n">unexpected</span> <span class="n">results</span><span class="o">.</span>
-
-<span class="n">h6</span><span class="o">.</span>
-
-<span class="n">Sometimes</span> <span class="n">it</span> <span class="n">may</span> <span class="n">be</span> <span class="n">required</span> <span class="n">to</span> <span class="ow">not</span> <span class="n">set</span> <span class="n">a</span> <span class="n">property</span> <span class="n">to</span> <span class="n">a</span> <span class="n">specific</span> <span class="n">value</span> <span class="n">but</span> <span class="n">to</span> <span class="n">just</span> <span class="n">remove</span> <span class="n">it</span> <span class="k">while</span> <span class="n">processing</span> <span class="n">the</span> <span class="n">content</span> <span class="n">update</span> <span class="n">request</span><span class="o">.</span> <span class="n">One</span> <span class="n">such</span> <span class="n">situation</span> <span class="n">is</span> <span class="n">a</span> <span class="n">property</span> <span class="n">filled</span> <span class="n">from</span> <span class="n">one</sp
 an> <span class="ow">or</span> <span class="n">more</span> <span class="n">checkboxes</span> <span class="n">in</span> <span class="n">an</span> <span class="n">HTML</span> <span class="n">form</span><span class="o">.</span> <span class="n">If</span> <span class="n">none</span> <span class="n">of</span> <span class="n">the</span> <span class="n">checkboxes</span> <span class="n">are</span> <span class="n">checked</span><span class="p">,</span> <span class="nb">no</span> <span class="n">parameter</span> <span class="n">is</span> <span class="n">actually</span> <span class="n">submitted</span> <span class="k">for</span> <span class="n">these</span> <span class="n">checkboxes</span><span class="o">.</span> <span class="n">Hence</span> <span class="n">the</span> <span class="n">SlingPostServlet</span> <span class="n">will</span> <span class="ow">not</span> <span class="n">touch</span> <span class="n">this</span> <span class="n">property</span> <span class="ow">and</span> <span c
 lass="n">effectively</span> <span class="n">leave</span> <span class="n">it</span> <span class="n">untouched</span><span class="p">,</span> <span class="k">while</span> <span class="n">the</span> <span class="n">natural</span> <span class="n">reaction</span> <span class="n">would</span> <span class="n">have</span> <span class="n">been</span> <span class="n">to</span> <span class="n">remove</span> <span class="n">the</span> <span class="n">property</span><span class="o">.</span>
-
-<span class="n">Here</span> <span class="n">comes</span> <span class="n">the</span>  <span class="n">suffixed</span> <span class="n">parameter</span><span class="o">.</span> <span class="n">This</span> <span class="n">simply</span> <span class="n">causes</span> <span class="n">the</span> <span class="n">indicated</span> <span class="n">property</span> <span class="n">be</span> <span class="n">removed</span> <span class="k">if</span> <span class="n">it</span> <span class="nb">exists</span><span class="o">.</span> <span class="n">If</span> <span class="n">the</span> <span class="n">property</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">exist</span><span class="p">,</span> <span class="n">nothing</span> <span class="n">more</span> <span class="n">happens</span><span class="o">.</span> <span class="n">The</span> <span class="n">actual</span> <span class="n">value</span> <span class="n">of</span> <span class="n">the</span>  <span class="n">suffixe
 d</span> <span class="n">parameter</span> <span class="n">does</span> <span class="ow">not</span> <span class="n">care</span> <span class="n">as</span> <span class="n">long</span> <span class="n">as</span> <span class="n">the</span> <span class="n">parameter</span> <span class="n">is</span> <span class="n">submitted</span><span class="o">.</span>
-
-<span class="n">Example:</span> <span class="n">To</span> <span class="n">ensure</span> <span class="n">the</span>  <span class="n">property</span> <span class="n">is</span> <span class="n">actually</span> <span class="n">removed</span> <span class="k">if</span> <span class="nb">no</span> <span class="n">color</span> <span class="n">has</span> <span class="n">been</span> <span class="n">selected</span><span class="p">,</span> <span class="n">you</span> <span class="n">might</span> <span class="k">use</span> <span class="n">the</span> <span class="n">following</span> <span class="n">form:</span>
-
-<span class="p">{</span><span class="n">code:html</span><span class="p">}</span>
-<span class="o">&lt;</span><span class="n">form</span> <span class="n">method</span><span class="o">=</span><span class="s">&quot;POST&quot;</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="n">enctype</span><span class="o">=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="o">&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;color&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;red&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;color&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;green&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;color&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;blue&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;color@Delete&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;delete text&quot;</span> <span class="o">/&gt;&lt;!--</span> <span class="n">actual</span> <span class="n">value</span> <span class="n">is</span> <span class="n">ignored</span> <span class="o">--&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;Submit&quot;</span> <span class="o">/&gt;</span>
-<span class="sr">&lt;/form&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;supplied_text&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;./text@ValueFrom&quot;</span> <span class="na">value=</span><span class="s">&quot;supplied_text&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;Submit&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
+</pre></div>
+
+
+<p>To prevent storing the additional paramaters in the repository you might want to use the prefixing mechanism as shown in the example above, where the <code>@ValueFrom</code> parameter is prefixed and thus the <code>supplied_text</code> parameter is not used for property setting.</p>
+<p>The <code>@ValueFrom</code> suffixed parameter is assumed to be single-valued. If the parameter has multiple values it is ignored completely.</p>
+<p>The <code>@ValueFrom</code> suffixed parameter is also special in that there must not be a correlated parameter without a suffix. Thus have parameters <code>text</code> and <code>text@ValueFrom</code> may have unexpected results.</p>
+<h6 id="delete"><code>@Delete</code></h6>
+<p>Sometimes it may be required to not set a property to a specific value but to just remove it while processing the content update request. One such situation is a property filled from one or more checkboxes in an HTML form. If none of the checkboxes are checked, no parameter is actually submitted for these checkboxes. Hence the SlingPostServlet will not touch this property and effectively leave it untouched, while the natural reaction would have been to remove the property.</p>
+<p>Here comes the <code>@Delete</code> suffixed parameter. This simply causes the indicated property be removed if it exists. If the property does not exist, nothing more happens. The actual value of the <code>@Delete</code> suffixed parameter does not care as long as the parameter is submitted.</p>
+<p>Example: To ensure the <code>color</code> property is actually removed if no color has been selected, you might use the following form:</p>
+<div class="codehilite"><pre><span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/first&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">name=</span><span class="s">&quot;color&quot;</span> <span class="na">value=</span><span class="s">&quot;red&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">name=</span><span class="s">&quot;color&quot;</span> <span class="na">value=</span><span class="s">&quot;green&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">name=</span><span class="s">&quot;color&quot;</span> <span class="na">value=</span><span class="s">&quot;blue&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;color@Delete&quot;</span> <span class="na">value=</span><span class="s">&quot;delete text&quot;</span> <span class="nt">/&gt;</span><span class="c">&lt;!-- actual value is ignored --&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;Submit&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
 </pre></div>
 
 
@@ -484,36 +464,30 @@ Sometimes a form client will supply empt
 <p>Now, that your bright and shiny content management application has great Flash-based file upload feature you will want to be able to use the pre-uploaded files for your content with the same request as when you upload other content. For example you might have a node storing some text and an illustration you uploaded as an image file.</p>
 <p>To support this kind of functionality, the <code>@MoveFrom</code> suffixed parameter may be set to the repository path of the node to where you uploaded the image file.</p>
 <p>Example: Your Flash-based file upload stored the file on the server at <code>/tmp/upload/123</code>. You now want to store this file along with a title and a text in a newly created node. The following form will be your friend:</p>
-<p>{code:html}
-<!-- trailing slash generates a name for the new node -->
-<form method="POST" action="/content/page/" enctype="multipart/form-data">
-    <input type="hidden" name="image@MoveFrom" value="/tmp/upload/123" />
-    <input type="text" name="title" />
-    <input type="text" name="text" />
-    <input type="Submit" />
-</form></p>
-<div class="codehilite"><pre><span class="n">If</span> <span class="n">there</span> <span class="nb">exists</span> <span class="nb">no</span> <span class="n">repository</span> <span class="n">item</span> <span class="n">at</span> <span class="n">the</span> <span class="n">indicated</span> <span class="n">path</span><span class="p">,</span> <span class="n">nothing</span> <span class="n">is</span> <span class="n">done</span><span class="o">.</span> <span class="n">If</span> <span class="n">the</span> <span class="n">item</span> <span class="n">indicated</span> <span class="n">by</span> <span class="n">the</span>  <span class="n">suffixed</span> <span class="n">parameter</span> <span class="n">already</span> <span class="nb">exists</span><span class="p">,</span> <span class="n">it</span> <span class="n">is</span> <span class="n">replaced</span> <span class="n">by</span> <span class="n">the</span> <span class="n">item</span> <span class="n">addressed</span> <span class="n">by</s
 pan> <span class="n">the</span> <span class="n">parameter</span> <span class="n">value</span> <span class="o">--</span> <span class="k">unless</span> <span class="n">of</span> <span class="n">course</span> <span class="n">there</span> <span class="n">is</span> <span class="nb">no</span> <span class="n">item</span> <span class="n">at</span> <span class="n">the</span> <span class="n">named</span> <span class="n">location</span><span class="o">.</span>
-
-<span class="n">The</span>  <span class="n">suffixed</span> <span class="n">parameter</span> <span class="n">is</span> <span class="n">assumed</span> <span class="n">to</span> <span class="n">be</span> <span class="n">single</span><span class="o">-</span><span class="n">valued</span><span class="o">.</span> <span class="n">If</span> <span class="n">the</span> <span class="n">parameter</span> <span class="n">has</span> <span class="n">multiple</span> <span class="nb">values</span> <span class="n">it</span> <span class="n">is</span> <span class="n">ignored</span> <span class="n">completely</span><span class="o">.</span>
-
-<span class="n">The</span>  <span class="n">suffixed</span> <span class="n">parameter</span> <span class="n">is</span> <span class="n">also</span> <span class="n">special</span> <span class="n">in</span> <span class="n">that</span> <span class="n">there</span> <span class="n">must</span> <span class="ow">not</span> <span class="n">be</span> <span class="n">a</span> <span class="n">correlated</span> <span class="n">parameter</span> <span class="n">without</span> <span class="n">a</span> <span class="n">suffix</span><span class="o">.</span> <span class="n">Thus</span> <span class="n">have</span> <span class="n">parameters</span>  <span class="ow">and</span>  <span class="n">may</span> <span class="n">have</span> <span class="n">unexpected</span> <span class="n">results</span><span class="o">.</span>
-
-<span class="n">The</span>  <span class="n">suffixed</span> <span class="n">parameter</span> <span class="n">in</span> <span class="n">fact</span> <span class="n">calls</span> <span class="k">for</span> <span class="n">a</span> <span class="n">sub</span><span class="o">-</span><span class="n">operation</span><span class="p">,</span> <span class="n">which</span> <span class="n">is</span> <span class="n">executed</span> <span class="n">after</span> <span class="n">the</span>  <span class="k">sub </span><span class="nf">operation</span> <span class="nf">but</span> <span class="nf">before</span> <span class="nf">any</span> <span class="nf">other</span> <span class="nf">tasks</span> <span class="nf">of</span> <span class="nf">content</span> <span class="nf">creattion</span> <span class="nf">and</span> <span class="nf">modification</span> <span class="nf">are</span> <span class="nf">done</span><span class="p">.</span>
-
-<span class="p">h6.</span>
-
-<span class="p">Similar to the  suffix exists a  suffix. The latter works exactly the same as the former except that the item addressed by the parameter value is not moved but just copied.</span>
-
-<span class="p">Example: Your Flash-based file upload stored the file on the server at . You now want to store this file along with a title and a text in a newly created node. The following form may be your friend:</span>
-
-<span class="p">{</span><span class="n">code:html</span><span class="p">}</span>
-<span class="o">&lt;!--</span> <span class="n">trailing</span> <span class="n">slash</span> <span class="n">generates</span> <span class="n">a</span> <span class="n">name</span> <span class="k">for</span> <span class="n">the</span> <span class="k">new</span> <span class="n">node</span> <span class="o">--&gt;</span>
-<span class="o">&lt;</span><span class="n">form</span> <span class="n">method</span><span class="o">=</span><span class="s">&quot;POST&quot;</span> <span class="n">action</span><span class="o">=</span><span class="s">&quot;/content/page/&quot;</span> <span class="n">enctype</span><span class="o">=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="o">&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;hidden&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;image@CopyFrom&quot;</span> <span class="n">value</span><span class="o">=</span><span class="s">&quot;/tmp/upload/123&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;title&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="n">name</span><span class="o">=</span><span class="s">&quot;text&quot;</span> <span class="o">/&gt;</span>
-    <span class="o">&lt;</span><span class="n">input</span> <span class="n">type</span><span class="o">=</span><span class="s">&quot;Submit&quot;</span> <span class="o">/&gt;</span>
-<span class="sr">&lt;/form&gt;</span>
+<div class="codehilite"><pre><span class="c">&lt;!-- trailing slash generates a name for the new node --&gt;</span>
+<span class="nt">&lt;form</span> <span class="na">method=</span><span class="s">&quot;POST&quot;</span> <span class="na">action=</span><span class="s">&quot;/content/page/&quot;</span> <span class="na">enctype=</span><span class="s">&quot;multipart/form-data&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;hidden&quot;</span> <span class="na">name=</span><span class="s">&quot;image@MoveFrom&quot;</span> <span class="na">value=</span><span class="s">&quot;/tmp/upload/123&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;title&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;text&quot;</span> <span class="na">name=</span><span class="s">&quot;text&quot;</span> <span class="nt">/&gt;</span>
+    <span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;Submit&quot;</span> <span class="nt">/&gt;</span>
+<span class="nt">&lt;/form&gt;</span>
+</pre></div>
+
+
+<p>If there exists no repository item at the indicated path, nothing is done. If the item indicated by the <code>@MoveFrom</code> suffixed parameter already exists, it is replaced by the item addressed by the parameter value -- unless of course there is no item at the named location.</p>

[... 265 lines stripped ...]


Mime
View raw message