You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bu...@apache.org on 2015/04/19 21:15:29 UTC

svn commit: r948305 - in /websites/staging/sling/trunk/content: ./ documentation/bundles/scripting/scripting-thymeleaf.html

Author: buildbot
Date: Sun Apr 19 19:15:29 2015
New Revision: 948305

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/bundles/scripting/scripting-thymeleaf.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Apr 19 19:15:29 2015
@@ -1 +1 @@
-1674545
+1674675

Modified: websites/staging/sling/trunk/content/documentation/bundles/scripting/scripting-thymeleaf.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/scripting/scripting-thymeleaf.html (original)
+++ websites/staging/sling/trunk/content/documentation/bundles/scripting/scripting-thymeleaf.html Sun Apr 19 19:15:29 2015
@@ -97,19 +97,24 @@
 <li><a href="#class-diagram">Class Diagram</a></li>
 <li><a href="#installation">Installation</a></li>
 <li><a href="#configuration">Configuration</a></li>
+<li><a href="#sling-dialect">Sling Dialect</a><ul>
+<li><a href="#include">include</a></li>
+</ul>
+</li>
 <li><a href="#sample">Sample</a></li>
 </ul>
 </div>
-<h2 id="features">Features</h2>
+<h1 id="features">Features</h1>
 <ul>
 <li>out of the box support for <em>legacy</em> HTML5 through embedded <em>NekoHTML</em></li>
 <li>runtime configurable <code>TemplateModeHandler</code>s for <em>XML</em>, <em>VALIDXML</em>, <em>XHTML</em>, <em>VALIDXHTML</em>, <em>HTML5</em> and <em>LEGACYHTML5</em></li>
 <li><code>ResourceResolver</code> backed by Sling's <code>ResourceResolver</code></li>
 <li><code>MessageResolver</code> backed by <code>ResourceBundleProvider</code> from <code>org.apache.sling.i18n</code></li>
+<li><code>SlingDialect</code></li>
 </ul>
-<h2 id="class-diagram">Class Diagram</h2>
+<h1 id="class-diagram">Class Diagram</h1>
 <p><a href="class-diagram.svg"><img alt="Class Diagram" src="class-diagram.svg" /></a></p>
-<h2 id="installation">Installation</h2>
+<h1 id="installation">Installation</h1>
 <p>For running Sling Scripting Thymeleaf with Sling's Launchpad some dependencies need to be resolved. This can be achieved by installing the following bundles:</p>
 <div class="codehilite"><pre><span class="n">mvn</span><span class="o">:</span><span class="n">org</span><span class="o">.</span><span class="na">apache</span><span class="o">.</span><span class="na">sling</span><span class="sr">/org.apache.sling.i18n/</span><span class="mf">2.2</span><span class="o">.</span><span class="mi">10</span>
 <span class="n">mvn</span><span class="o">:</span><span class="n">org</span><span class="o">.</span><span class="na">javassist</span><span class="sr">/javassist/</span><span class="mf">3.18</span><span class="o">.</span><span class="mi">2</span><span class="o">-</span><span class="n">GA</span>
@@ -125,18 +130,31 @@
 </pre></div>
 
 
-<h2 id="configuration">Configuration</h2>
+<h1 id="configuration">Configuration</h1>
 <p>By default Sling Scripting Thymeleaf's <em>Script Engine Factory</em> is configured for templates with extension <code>html</code> and mime type <code>text/html</code>.</p>
 <p><img alt="Sling Scripting Thymeleaf Script Engine Factory" src="scripting-thymeleaf-script-engine-factory.png" /></p>
 <p>The <em>Non-Caching Template Resolver</em> (the only available template resolver for now) is configured to read templates with encoding <code>UTF-8</code>.</p>
 <p><img alt="Sling Scripting Thymeleaf Non-Caching Template Resolver" src="scripting-thymeleaf-non-caching-template-resolver.png" /></p>
 <p>The <em>HTML5 Template Mode Handler</em> is configured to handle all paths which match the pattern <code>*.html</code>.</p>
 <p><img alt="Sling Scripting Thymeleaf HTML5 Template Mode Handler" src="scripting-thymeleaf-html5-template-mode-handler.png" /></p>
-<h2 id="sample">Sample</h2>
+<h1 id="sling-dialect">Sling Dialect</h1>
+<p>Sling Scripting Thymeleaf comes with its own dialect using the <code>sling</code> prefix/namespace currently supporting the <em>include</em> feature known from <a href="/documentation/bundles/sling-scripting-jsp-taglib.html">Sling Scripting JSP Taglib</a>.</p>
+<h2 id="include">include</h2>
+<p>The resource object or the path to the resource object to include in the current request processing. If this path is relative it is appended to the path of the current resource whose script is including the given resource.</p>
+<ul>
+<li><code>data-sling-include</code> in HTML5, <code>sling:include</code> in XHTML (<code>Resource</code> or <code>String</code>)</li>
+<li>supported options (* = <a href="http://sling.apache.org/apidocs/sling7/org/apache/sling/api/request/RequestDispatcherOptions.html">RequestDispatcher option</a>):</li>
+<li><code>addSelectors</code> (<code>String</code>) *: When dispatching, add the value provided by this option to the selectors.</li>
+<li><code>replaceSelectors</code> (<code>String</code>) *: When dispatching, replace selectors by the value provided by this option.</li>
+<li><code>replaceSuffix</code> (<code>String</code>) *: When dispatching, replace the suffix by the value provided by this option.</li>
+<li><code>resourceType</code> (<code>String</code>) *: The resource type of a resource to include. If the resource to be included is specified with the path attribute, which cannot be resolved to a resource, the tag may create a synthetic resource object out of the path and this resource type. If the resource type is set the path must be the exact path to a resource object. That is, adding parameters, selectors and extensions to the path is not supported if the resource type is set.</li>
+<li><code>unwrap</code> (<code>Boolean</code>): removes the host element</li>
+</ul>
+<h1 id="sample">Sample</h1>
 <p>The <a href="http://svn.apache.org/repos/asf/sling/trunk/samples/fling/">Sling Fling Sample</a> is a sample using Sling Scripting Thymeleaf with <a href="/documentation/bundles/models.html">Sling Models</a> and <a href="/documentation/bundles/sling-query.html">Sling Query</a>.</p>
 <p><img alt="Sling Fling Sample" src="sling-fling-sample.png" /></p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1639489 by olli on Thu, 13 Nov 2014 19:29:51 +0000
+        Rev. 1674675 by olli on Sun, 19 Apr 2015 19:15:16 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project