You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bu...@apache.org on 2015/06/27 23:21:05 UTC

svn commit: r956226 [3/34] - in /websites/production/tapestry/content: ./ 2010/10/11/ 2010/10/31/ 2010/11/18/ 2010/11/19/ 2010/12/16/ 2010/12/17/ 2011/01/10/ 2011/03/29/ 2011/06/13/ 2011/06/24/ 2011/06/29/ 2011/07/29/ 2011/08/16/ 2011/08/27/ 2011/10/31...

Modified: websites/production/tapestry/content/assets.html
==============================================================================
--- websites/production/tapestry/content/assets.html (original)
+++ websites/production/tapestry/content/assets.html Sat Jun 27 21:21:02 2015
@@ -27,16 +27,6 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
-    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
-  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
-  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -55,7 +45,7 @@
   <input type="submit" value="Search">
 </form>
 
-</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Assets</h1></div></div>
+</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Assets</h1></div></div>
 <div class="clearer"></div>
 </div>
 
@@ -68,115 +58,35 @@
 
 <div id="content">
 <div id="ConfluenceContent"><h1 id="Assets-Assets">Assets</h1><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
-<h3>Related Articles</h3>
-<ul class="content-by-label"><li>
-            <div>
-                    <span class="icon icon-page" title="Page">Page:</span>            </div>
-
-            <div class="details">
-                            <a shape="rect" href="assets.html">Assets</a>
-                    
-                
-                            </div>
-        </li><li>
-            <div>
-                    <span class="icon icon-page" title="Page">Page:</span>            </div>
-
-            <div class="details">
-                            <a shape="rect" href="request-processing.html">Request Processing</a>
-                    
-                
-                            </div>
-        </li><li>
-            <div>
-                    <span class="icon icon-page" title="Page">Page:</span>            </div>
-
-            <div class="details">
-                            <a shape="rect" href="configuration.html">Configuration</a>
-                    
-                
-                            </div>
-        </li><li>
-            <div>
-                    <span class="icon icon-page" title="Page">Page:</span>            </div>
-
-            <div class="details">
-                            <a shape="rect" href="css.html">CSS</a>
-                    
-                
-                            </div>
-        </li><li>
-            <div>
-                    <span class="icon icon-page" title="Page">Page:</span>            </div>
-
-            <div class="details">
-                            <a shape="rect" href="legacy-javascript.html">Legacy JavaScript</a>
-                    
-                
-                            </div>
-        </li><li>
-            <div>
-                    <span class="icon icon-page" title="Page">Page:</span>            </div>
-
-            <div class="details">
-                            <a shape="rect" href="layout-component.html">Layout Component</a>
-                    
-                
-                            </div>
-        </li></ul>
-</div><p>In Tapestry, <strong>Assets</strong> are any kind of <em>static</em> content that may be downloaded to a client web browser, such as images, style sheets and JavaScript files.</p><p>Assets are most commonly stored in the web application's context folder ... stored inside the web application WAR file in the usual JEE fashion. In addition, Tapestry treats files stored <em>on the classpath</em>, with your Java class files, as assets visible to the web browser.</p><p>Assets are exposed to your code as instances of the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Asset.html">Asset</a> interface.</p><h3 id="Assets-AssetsinTemplates">Assets in Templates</h3><p>Assets can also be referenced directly in templates. Two <a shape="rect" href="component-parameters.html#ComponentParameters-binding-expressions">binding prefixes</a> exist for this: "asset:" and "context:". The "asset:" prefix can obtain assets from the classpat
 h (the default) or from the web context (by specifying the "context:" domain explicitly):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;img src=&quot;${asset:context:image/tapestry_banner.gif}&quot; alt=&quot;Banner&quot;/&gt;
-]]></script>
-</div></div>    <div class="aui-message hint shadowed information-macro">
-                            <span class="aui-icon icon-hint">Icon</span>
-                <div class="message-content">
-                            <p>This is an example of using a <em>template expansion</em> inside an ordinary element (rather than a component).</p>
-                    </div>
-    </div>
-<p>Because accessing context assets is so common, the "context:" binding prefix was introduced:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;img src=&quot;${context:image/tapestry_banner.gif}&quot; alt=&quot;Banner&quot;/&gt;
+<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div><p>In Tapestry, <strong>Assets</strong> are any kind of <em>static</em> content that may be downloaded to a client web browser, such as images, style sheets and JavaScript files.</p><p>Assets are most commonly stored in the web application's context folder ... stored inside the web application WAR file in the usual JEE fashion. In addition, Tapestry treats files stored <em>on the classpath</em>, with your Java class files, as assets visible to the web browser.</p><p>Assets are exposed to your code as instances of the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Asset.html">Asset</a> interface.</p><h3 id="Assets-AssetsinTemplates">Assets in Templates</h3><p>Assets can also be referenced directly in templates. Two <a shape="rect" hr
 ef="component-parameters.html#ComponentParameters-binding-expressions">binding prefixes</a> exist for this: "asset:" and "context:". The "asset:" prefix can obtain assets from the classpath (the default) or from the web context (by specifying the "context:" domain explicitly):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;img src=&quot;${asset:context:image/tapestry_banner.gif}&quot; alt=&quot;Banner&quot;/&gt;
+]]></script>
+</div></div><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This is an example of using a <em>template expansion</em> inside an ordinary element (rather than a component).</p></div></div><p>Because accessing context assets is so common, the "context:" binding prefix was introduced:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;img src=&quot;${context:image/tapestry_banner.gif}&quot; alt=&quot;Banner&quot;/&gt;
 ]]></script>
 </div></div><h3 id="Assets-AssetsinComponentClasses">Assets in Component Classes</h3><p>Components learn about assets via <a shape="rect" href="injection.html">injection</a>. The @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> annotation allows Assets to be injected into components as read-only properties. The path to the resource is specified using the Path annotation:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Inject
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Inject
 @Path(&quot;context:images/tapestry_banner.gif&quot;)
 private Asset banner;
 ]]></script>
 </div></div><p>Assets are located within <em>domains</em>; these domains are identified by the prefix on the @Path annotation's <code>value</code>.</p><h3 id="Assets-ClasspathAssets">Classpath Assets&#160;</h3><p>If the prefix is omitted, the value will be interpreted as a path relative to the Java class file itself, within the "classpath:" domain. This is often used when creating component libraries, where the assets used by the components are packaged in the JAR with the components themselves.</p><p>Unlike elsewhere in Tapestry, <em>case matters</em>. This is because Tapestry is dependent on the Servlet API and the Java runtime to access the underlying files, and those APIs, unlike Tapestry, are case sensitive. Be aware that some <em>operating systems</em> (such as Windows) are case insensitive, which may mask errors that will be revealed at deployment (if the deployment operating system is case sensitive, such as Linux).</p><p>In Tapestry 5.3 and earlier, classpath assets are pac
 kaged in the same folder as the compiled Java class (as well as component templates and so forth). Relative assets are based on this location, the location of the component's .class file.</p><p>In Tapestry 5.4, this is supported (but will generate a runtime warning). Classpath resources are expected to be stored under&#160;<code>META-INF/assets</code>.</p><p>In Tapestry 5.5, support for classpath assets&#160;<strong>not</strong> under&#160;<code>META-INF/assets</code> will be removed.</p><h3 id="Assets-META-INF/assets">META-INF/assets</h3><p>Support for storing assets under&#160;<code>META-INF/assets</code> was added in Tapestry 5.4.</p><p>For security reasons (detailed below), it is best to have the assets that will be exposed to the client segregated from compiled Java classes. For that reason, classpath assets must be stored in&#160;<code>META-INF/assets</code> or a subfolder.</p><p>For an&#160;<em>application</em> asset, the assets can be stored directly in&#160;<code>META-INF/a
 ssets</code>.</p><p>For a&#160;<em>library</em> asset, Tapestry uses the library's name (from its LibraryMapping) (such as "core" for the Tapestry core library); &#160;The library name becomes a folder under&#160;<code>META-INF/assets</code>; for example, Tapestry stores its component-related assets under&#160;<code>META-INF/assets/core</code>.</p><h3 id="Assets-RelativeAssets">Relative Assets</h3><p>You can use relative paths with domains (if you omit the prefix):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Inject
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Inject
 @Path(&quot;images/edit.png&quot;)
 private Asset icon;
 ]]></script>
 </div></div><p>This represents a relative path from the default location for the asset. For Tapestry 5.4, this will resolve as either relative to the component's class file (the logic for Tapestry 5.3 and earlier), or relative to the correct folder within&#160;<code>META-INF/assets</code> (the logic for Tapestry 5.4 and later).</p><p>You may use the standard&#160;<code>./</code> and&#160;<code>../</code> prefixes to refer to the current folder, and containing folder, respectfully.</p><p>Since you must omit the asset domain prefix in order to specify a relative path, this only makes sense for components packaged in a library for reuse.</p><h3 id="Assets-SymbolsForAssets">Symbols For Assets</h3><p>Symbols inside the annotation value are expanded. This allows you to define a symbol and reference it as part of the path. For example, you could contribute a symbol named "skin.root" as "context:skins/basic" and then reference an asset from within it:</p><div class="code panel pdl" style="b
 order-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Inject
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Inject
 @Path(&quot;${skin.root}/style.css&quot;)
 private Asset style;
 ]]></script>
-</div></div>    <div class="aui-message warning shadowed information-macro">
-                            <span class="aui-icon icon-warning">Icon</span>
-                <div class="message-content">
-                            <p>The use of the <code>${...</code>} syntax here is a <em>symbol expansion</em> (because it occurs in an annotation in Java code), rather than a <em>template expansion</em> (which occurs only in Tapestry template files).</p>
-                    </div>
-    </div>
-<p>An override of the skin.root symbol would affect all references to the named asset.</p><h3 id="Assets-LocalizationofAssets">Localization of Assets</h3><p>Main Article: <a shape="rect" href="localization.html">Localization</a></p><p>Assets are localized; Tapestry will search for a variation of the file appropriate to the effective locale for the request. In the previous example, a German user of the application may see a file named <code>edit_de.png</code> (if such a file exists).</p><h3 id="Assets-NewAssetDomains">New Asset Domains</h3><p>If you wish to create new domains for assets, for example to allow assets to be stored on the file system or in a database, you may define a new <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetFactory.html">AssetFactory</a> and contribute it to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetSour
 ce.html">AssetSource</a> service configuration.</p><h3 id="Assets-AssetFingerprinting(Tapestry5.3andearlier)">Asset Fingerprinting (Tapestry 5.3 and earlier)</h3><p>Tapestry creates a new URL for assets (whether context or classpath). The URL is of the form /assets/<strong>version</strong>/<strong>folder</strong>/<strong>path</strong>.</p><ul><li><strong>version</strong>: Application version number, defined by the <code>tapestry.application-version</code> symbol in your application module (normally AppModule.java). The default is a random hex number.</li><li><strong>folder</strong>: Identifies the library containing the asset, or "ctx" for a context asset, or "stack" (used when combining multiple JavaScript files into a single virtual asset).</li><li><strong>path</strong>: The path below the root package of the library to the specific asset file.</li></ul><h3 id="Assets-AssetFingerprinting(Tapestry5.4andlater)">Asset Fingerprinting<span style="line-height: 1.5;">&#160;(Tapestry 5.4 
 and later)</span></h3><p>Tapestry 5.4 changes how Asset URLs are constructed, the version number is now a&#160;<em>content fingerprint</em>; it is a hash of the actual content of the asset.</p><p>Assets get a far-future expires header. It is no longer necessary or desirable to change the application version number.</p><p>During development or production, if an asset is changed in any way, it will have a new content fingerprint and will appear, to the browser, to be an entirely new immutable resource.</p><h3 id="Assets-CSSLinkRewriting">CSS Link Rewriting</h3><p>It is frequently the case that CSS files will include links to other files, such as background images, using the&#160;<code>url</code>() value syntax. Under 5.4, the URL for the CSS file and the targeted file be broken, due to the inclusions of the CSS file's content hash fingerprint. To fix this, Tapestry parses CSS files, locates the&#160;<code>url()</code> directives, and rewrites the URLs to be absolute (including the tar
 geted file's content hash fingerprint).</p><h3 id="Assets-PerformanceNotes">Performance Notes</h3><p>Assets are expected to be entirely static (not changing while the application is deployed). This allows Tapestry to perform some important performance optimizations.</p><p>Tapestry GZIP compresses the content of all assets &#8211; if the asset is compressible, the client supports it, and you don't <a shape="rect" href="configuration.html#Configuration-tapestry.gzipcompressionenabled">explicitly disable it</a>.</p><p><span style="line-height: 1.4285715;">Further, the asset will get a </span><em style="line-height: 1.4285715;">far future expires header</em><span style="line-height: 1.4285715;">, which will encourage the client browser to cache the asset.</span></p><p>You should have an explicit application version number for any production application. Client browsers will aggressively cache downloaded assets; they will usually not even send a request to see if the asset has changed on
 ce the asset is downloaded the first time. Because of this it is <em>very important</em> that each new deployment of your application has a new <a shape="rect" href="configuration.html#Configuration-tapestry.applicationversion">version number</a>, to force existing clients to re-download all assets.</p><h3 id="Assets-AssetSecurity">Asset Security</h3>    <div class="aui-message problem shadowed information-macro">
-                            <span class="aui-icon icon-problem">Icon</span>
-                <div class="message-content">
-                            <p>This applies to how Tapestry 5.3 and earlier manage classpath assets; Tapestry 5.4 introduces another system which doesn't have this issue.</p>
-                    </div>
-    </div>
-<p>&#160;</p><p>Because Tapestry directly exposes files on the classpath to the clients, some thought has gone into ensuring that malicious clients are not able to download assets that should not be visible to them.</p><p>First off all, there's a package limitation: classpath assets are only visible if there's a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/LibraryMapping.html">LibraryMapping</a> for them, and the library mapping substitutes for the initial folders on the classpath. Since the most secure assets, things like <code>hibernate.cfg.xml</code> are located in the unnamed package, they are always off limits.</p><p>But what about other files on the classpath? Imagine this scenario:</p><ul><li>Your Login page exposes a classpath asset, <code>icon.png</code>.</li><li><p>A malicious client copies the URL, <code>/assets/1.0.0/app/pages/icon.png (</code><span style="line-height: 1.4285715;">which would indicat
 e that the Login page is actually inside a library, which is unlikely. More likely, icon.png is a context asset and the malicious user guessed the path for Login.class by looking at the Tapestry source code.)&#160;</span><span style="line-height: 1.4285715;">and changes the file name to </span><code style="line-height: 1.4285715;">Login.class</code><span style="line-height: 1.4285715;">.</span></p></li><li><p>The client decompiles the class file and spots your secret emergency password: goodbye security! (<span style="line-height: 1.4285715;">Never create such back doors, of course!)</span></p></li></ul><p>Fortunately, this can't happen. Files with extension ".class" are secured; they must be accompanied in the URL with a query parameter that is the MD5 hash of the file's contents. If the query parameter is absent, or doesn't match the actual file's content, the request is rejected.</p><p>When your code exposes an Asset, the URL will automatically include the query parameter if the 
 file type is secured. The malicious user is locked out of access to the files. (<span style="line-height: 1.4285715;">Unless they already have the files so that they can generate the MD5 checksum ... to get access to the files they already have.)</span></p><p>By default, Tapestry secures file extensions ".class', ".tml" and ".properties". The list can be extended by contributing to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ResourceDigestGenerator.html">ResourceDigestGenerator</a> service:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public static void contributeResourceDigestGenerator(Configuration&lt;String&gt; configuration)
+</div></div><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The use of the <code>${...</code>} syntax here is a <em>symbol expansion</em> (because it occurs in an annotation in Java code), rather than a <em>template expansion</em> (which occurs only in Tapestry template files).</p></div></div><p>An override of the skin.root symbol would affect all references to the named asset.</p><h3 id="Assets-LocalizationofAssets">Localization of Assets</h3><p>Main Article: <a shape="rect" href="localization.html">Localization</a></p><p>Assets are localized; Tapestry will search for a variation of the file appropriate to the effective locale for the request. In the previous example, a German user of the application may see a file named <code>edit_de.png</code> (if such a file exists).</p><h3 id="Assets-NewAssetDomains">Ne
 w Asset Domains</h3><p>If you wish to create new domains for assets, for example to allow assets to be stored on the file system or in a database, you may define a new <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetFactory.html">AssetFactory</a> and contribute it to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/AssetSource.html">AssetSource</a> service configuration.</p><h3 id="Assets-AssetFingerprinting(Tapestry5.3andearlier)">Asset Fingerprinting (Tapestry 5.3 and earlier)</h3><p>Tapestry creates a new URL for assets (whether context or classpath). The URL is of the form /assets/<strong>version</strong>/<strong>folder</strong>/<strong>path</strong>.</p><ul><li><strong>version</strong>: Application version number, defined by the <code>tapestry.application-version</code> symbol in your application module (normally AppModule.java). The 
 default is a random hex number.</li><li><strong>folder</strong>: Identifies the library containing the asset, or "ctx" for a context asset, or "stack" (used when combining multiple JavaScript files into a single virtual asset).</li><li><strong>path</strong>: The path below the root package of the library to the specific asset file.</li></ul><h3 id="Assets-AssetFingerprinting(Tapestry5.4andlater)">Asset Fingerprinting<span style="line-height: 1.5;">&#160;(Tapestry 5.4 and later)</span></h3><p>Tapestry 5.4 changes how Asset URLs are constructed, the version number is now a&#160;<em>content fingerprint</em>; it is a hash of the actual content of the asset.</p><p>Assets get a far-future expires header. It is no longer necessary or desirable to change the application version number.</p><p>During development or production, if an asset is changed in any way, it will have a new content fingerprint and will appear, to the browser, to be an entirely new immutable resource.</p><h3 id="Assets-C
 SSLinkRewriting">CSS Link Rewriting</h3><p>It is frequently the case that CSS files will include links to other files, such as background images, using the&#160;<code>url</code>() value syntax. Under 5.4, the URL for the CSS file and the targeted file be broken, due to the inclusions of the CSS file's content hash fingerprint. To fix this, Tapestry parses CSS files, locates the&#160;<code>url()</code> directives, and rewrites the URLs to be absolute (including the targeted file's content hash fingerprint).</p><h3 id="Assets-PerformanceNotes">Performance Notes</h3><p>Assets are expected to be entirely static (not changing while the application is deployed). This allows Tapestry to perform some important performance optimizations.</p><p>Tapestry GZIP compresses the content of all assets &#8211; if the asset is compressible, the client supports it, and you don't <a shape="rect" href="configuration.html#Configuration-tapestry.gzipcompressionenabled">explicitly disable it</a>.</p><p><spa
 n style="line-height: 1.4285715;">Further, the asset will get a </span><em style="line-height: 1.4285715;">far future expires header</em><span style="line-height: 1.4285715;">, which will encourage the client browser to cache the asset.</span></p><p>You should have an explicit application version number for any production application. Client browsers will aggressively cache downloaded assets; they will usually not even send a request to see if the asset has changed once the asset is downloaded the first time. Because of this it is <em>very important</em> that each new deployment of your application has a new <a shape="rect" href="configuration.html#Configuration-tapestry.applicationversion">version number</a>, to force existing clients to re-download all assets.</p><h3 id="Assets-AssetSecurity">Asset Security</h3><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></
 span><div class="confluence-information-macro-body"><p>This applies to how Tapestry 5.3 and earlier manage classpath assets; Tapestry 5.4 introduces another system which doesn't have this issue.</p></div></div><p>&#160;</p><p>Because Tapestry directly exposes files on the classpath to the clients, some thought has gone into ensuring that malicious clients are not able to download assets that should not be visible to them.</p><p>First off all, there's a package limitation: classpath assets are only visible if there's a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/LibraryMapping.html">LibraryMapping</a> for them, and the library mapping substitutes for the initial folders on the classpath. Since the most secure assets, things like <code>hibernate.cfg.xml</code> are located in the unnamed package, they are always off limits.</p><p>But what about other files on the classpath? Imagine this scenario:</p><ul><li>Your L
 ogin page exposes a classpath asset, <code>icon.png</code>.</li><li><p>A malicious client copies the URL, <code>/assets/1.0.0/app/pages/icon.png (</code><span style="line-height: 1.4285715;">which would indicate that the Login page is actually inside a library, which is unlikely. More likely, icon.png is a context asset and the malicious user guessed the path for Login.class by looking at the Tapestry source code.)&#160;</span><span style="line-height: 1.4285715;">and changes the file name to </span><code style="line-height: 1.4285715;">Login.class</code><span style="line-height: 1.4285715;">.</span></p></li><li><p>The client decompiles the class file and spots your secret emergency password: goodbye security! (<span style="line-height: 1.4285715;">Never create such back doors, of course!)</span></p></li></ul><p>Fortunately, this can't happen. Files with extension ".class" are secured; they must be accompanied in the URL with a query parameter that is the MD5 hash of the file's cont
 ents. If the query parameter is absent, or doesn't match the actual file's content, the request is rejected.</p><p>When your code exposes an Asset, the URL will automatically include the query parameter if the file type is secured. The malicious user is locked out of access to the files. (<span style="line-height: 1.4285715;">Unless they already have the files so that they can generate the MD5 checksum ... to get access to the files they already have.)</span></p><p>By default, Tapestry secures file extensions ".class', ".tml" and ".properties". The list can be extended by contributing to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/ResourceDigestGenerator.html">ResourceDigestGenerator</a> service:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public static void contributeResourceDigestGenerator(Configuration&lt;String&gt; configuration)
 {
     configuration.add(&quot;xyz&quot;);
 }
 ]]></script>
-</div></div>    <div class="aui-message problem shadowed information-macro">
-                            <span class="aui-icon icon-problem">Icon</span>
-                <div class="message-content">
-                            <p>Starting in Tapestry 5.4, there is a move to ensure that all assets are stored under&#160;<code>META-INF/assets</code>, rather than on the general classpath.</p><p>In Tapestry 5.5, assets on the general classpath will not be supported at all.</p>
-                    </div>
-    </div>
-<h3 id="Assets-MinimizingAssets">Minimizing Assets</h3><p>Since version 5.3, Tapestry provides a service, <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/assets/ResourceMinimizer.html">ResourceMinimizer</a>, which will help to minimize all your static resources (principally CSS and JavaScript files).</p><p>Minimization takes place before GZip compression. When aggregating JavaScript for a JavaScriptStack, the minimization is on the aggregated asset, not the individual assets being aggregated.</p><p>By default, this service does nothing. You should include a the&#160;tapestry-yuicompressor library (for Tapestry 5.3) or tapestry-webresources (for Tapestry 5.4), which makes it possible to minimize CSS and JavaScript files.</p><div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro"><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader pan
 elHeader pdl" style="border-bottom-width: 1px;"><b>For Tapestry 5.3: pom.xml (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+</div></div><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Starting in Tapestry 5.4, there is a move to ensure that all assets are stored under&#160;<code>META-INF/assets</code>, rather than on the general classpath.</p><p>In Tapestry 5.5, assets on the general classpath will not be supported at all.</p></div></div><h3 id="Assets-MinimizingAssets">Minimizing Assets</h3><p>Since version 5.3, Tapestry provides a service, <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/assets/ResourceMinimizer.html">ResourceMinimizer</a>, which will help to minimize all your static resources (principally CSS and JavaScript files).</p><p>Minimization takes place before GZip compression. When aggregating JavaScript for a JavaScriptStack, the minimization is on
  the aggregated asset, not the individual assets being aggregated.</p><p>By default, this service does nothing. You should include a the&#160;tapestry-yuicompressor library (for Tapestry 5.3) or tapestry-webresources (for Tapestry 5.4), which makes it possible to minimize CSS and JavaScript files.</p><div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro"><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>For Tapestry 5.3: pom.xml (partial)</b></div><div class="codeContent panelContent pdl">
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.tapestry&lt;/groupId&gt;
     &lt;artifactId&gt;tapestry-yuicompressor&lt;/artifactId&gt;
     &lt;version&gt;5.3.1&lt;/version&gt;
@@ -184,14 +94,14 @@ private Asset style;
 
 ]]></script>
 </div></div></div><div class="columnMacro"><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>For Tapestry 5.4: pom.xml (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.tapestry&lt;/groupId&gt;
     &lt;artifactId&gt;tapestry-webresources&lt;/artifactId&gt;
     &lt;version&gt;5.4&lt;/version&gt;
 &lt;/dependency&gt;
 ]]></script>
 </div></div></div></div></div></div><p>&#160;</p><p>By adding this dependency, all your JavaScript and CSS files will be minimized when <a shape="rect" href="configuration.html">PRODUCTION_MODE=true</a>. You can force the minimization of these files, by changing the value of the constant SymbolConstants.MINIFICATION_ENABLED in your module class (usually AppModule.java):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Contribute(SymbolProvider.class)
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Contribute(SymbolProvider.class)
 @ApplicationDefaults
 public static void contributeApplicationDefaults(MappedConfiguration&lt;String, String&gt; configuration)
 {
@@ -199,7 +109,7 @@ public static void contributeApplication
 }
 ]]></script>
 </div></div><p>If you want to add your own minimizer for particular types of assets, you can contribute to the ResourceMinimizer service. The service configuration maps the MIME-TYPE of your resource to an implementation of the ResourceMinimizer interface.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>AppModule.java (partial)</b></div><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Contribute(ResourceMinimizer.class)
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Contribute(ResourceMinimizer.class)
 @Primary
 public static void contributeMinimizers(MappedConfiguration&lt;String, ResourceMinimizer&gt; configuration)
 {

Modified: websites/production/tapestry/content/autoloading-modules.html
==============================================================================
--- websites/production/tapestry/content/autoloading-modules.html (original)
+++ websites/production/tapestry/content/autoloading-modules.html Sat Jun 27 21:21:02 2015
@@ -27,16 +27,6 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
-    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
-  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
-  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -55,7 +45,7 @@
   <input type="submit" value="Search">
 </form>
 
-</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Autoloading Modules</h1></div></div>
+</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Autoloading Modules</h1></div></div>
 <div class="clearer"></div>
 </div>
 
@@ -76,10 +66,10 @@ table.ScrollbarTable td.ScrollbarNextNam
 table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}
 
 /*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="case-insensitivity.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="case-insensitivity.html">Case Insensitivity</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="ioc.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="ioc.html">IoC</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="service-implementation-reloading.html">Service Implementation Reloading</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="service-implementation-rel
 oading.html"><img align="middle" border="0" src="https://cwiki.apache.org/confluence/images/icons/forwd_16.gif" width="16" height="16"></a></td></tr></table></div><h1 id="AutoloadingModules-AutoloadingModules">Autoloading Modules</h1><p>An important part of Tapestry IoC is the autoloading of modules; this allows new features to be added to an application just by "dropping in" a JAR that contains a module: the services in the module are automatically integrated into the overall service registry, along with any configuration or other supporting code and resources.</p><p>An example of this is the <a shape="rect" href="uploading-files.html">tapestry-upload</a> library, which introduces an Upload component, along with supporting services related to handling file upload requests.</p><p>The core Tapestry IoC module is automatically included. When using the Tapestry web framework, the core Tapestry module is also included, as is an optional per-application module, plus any autoloaded module
 s.</p><p>Module autoloading isn't 100% free ... you must tell Tapestry IoC where the modules to load are located, which can be done via a Manifest file entry, or via an annotation.</p><h1 id="AutoloadingModules-JARManifestEntries">JAR Manifest Entries</h1><p>When setting up the registry, Tapestry can automatically locate modules packaged into JARs. It does this by searching for a particular global manifest entry.</p><p>The manifest entry name is "Tapestry-Module-Classes". The value is a comma-separated list of fully qualified class names of module classes (this allows a single JAR to contain multiple, related modules). Whitespace is ignored.</p><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: text; gutter: false" type="syntaxhighlighter"><![CDATA[Manifest-Version: 1.0
+<script class="brush: text; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[Manifest-Version: 1.0
 Tapestry-Module-Classes: org.example.mylib.LibModule, org.example.mylib.internal.InternalModule]]></script>
 </div></div><p>If you are using Maven 2, then getting these entries into your JAR's manifest is as simple as some configuration in your pom.xml:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;project&gt;
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;project&gt;
   . . .
   &lt;build&gt;
     &lt;plugins&gt;
@@ -100,7 +90,7 @@ Tapestry-Module-Classes: org.example.myl
   . . .
 &lt;/project&gt;]]></script>
 </div></div><p>More details are provided in the <a shape="rect" class="external-link" href="http://maven.apache.org/guides/mini/guide-manifest.html">Maven Manifest Guide</a>.</p><h1 id="AutoloadingModules-SubModuleAnnotation">SubModule Annotation</h1><p>Often, you will have several different modules working together that should all be loaded as a unit.</p><p>One approach is to update the module ids into the manifest, as shown in the previous extension.</p><p>This can become tedious, and somewhat brittle in the face of refactorings (such as renaming of classes or packages).</p><p>A better alternative is the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/SubModule.html">SubModule annotation</a> annotation.</p><p>The value for this annotation is a list of <em>additional</em> classes to be treated as module classes, exactly as if they were identified in the manifest. Despite the name, there is no hierarchy of 
 modules in Tapestry IoC.</p><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@SubModule(
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@SubModule(
 { InternalTransformModule.class })
 public final class InternalModule
 {

Modified: websites/production/tapestry/content/banner.html
==============================================================================
--- websites/production/tapestry/content/banner.html (original)
+++ websites/production/tapestry/content/banner.html Sat Jun 27 21:21:02 2015
@@ -45,7 +45,7 @@
   <input type="submit" value="Search">
 </form>
 
-</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Banner</h1></div></div>
+</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Banner</h1></div></div>
 <div class="clearer"></div>
 </div>
 

Modified: websites/production/tapestry/content/bean-validation.html
==============================================================================
--- websites/production/tapestry/content/bean-validation.html (original)
+++ websites/production/tapestry/content/bean-validation.html Sat Jun 27 21:21:02 2015
@@ -27,17 +27,6 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
-    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
-  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
-  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushJScript.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -56,7 +45,7 @@
   <input type="submit" value="Search">
 </form>
 
-</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Bean Validation</h1></div></div>
+</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Bean Validation</h1></div></div>
 <div class="clearer"></div>
 </div>
 
@@ -70,39 +59,12 @@
 <div id="content">
 <div id="ConfluenceContent">
 
-    <div class="aui-message hint shadowed information-macro">
-                    <p class="title">Added in 5.2</p>
-                            <span class="aui-icon icon-hint">Icon</span>
-                <div class="message-content">
-                            
-
-                    </div>
-    </div>
-
+<div class="confluence-information-macro confluence-information-macro-information"><p class="title">Added in 5.2</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
+</div></div>
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;">
 <p>&#160;</p></div><div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px">
-<h3>Related Articles</h3>
-<ul class="content-by-label"><li>
-            <div>
-                    <span class="icon icon-page" title="Page">Page:</span>            </div>
-
-            <div class="details">
-                            <a shape="rect" href="bean-validation.html">Bean Validation</a>
-                    
-                
-                            </div>
-        </li><li>
-            <div>
-                    <span class="icon icon-page" title="Page">Page:</span>            </div>
-
-            <div class="details">
-                            <a shape="rect" href="forms-and-validation.html">Forms and Validation</a>
-                    
-                
-                            </div>
-        </li></ul>
-</div><h1 id="BeanValidation-IntegrateJSR303-BeanValidationAPI">Integrate JSR 303 - Bean Validation API</h1><p>Tapestry provides a powerful validation mechanism (see <a shape="rect" href="forms-and-validation.html">Forms and Validation</a>). Among other things this mechanism allows you to annotate your domain model classes with the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beaneditor/Validate.html">@Validate</a> annotation. This annotation is problematic if your domain model is used in non-Tapestry applications as well as in Tapestry applications. Your non-Tapestry application becomes dependent on <em>tapestry5-annotations</em> module. To make your domain model independent from Tapestry you can use the <a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=303" >JSR 303: Bean Validation</a>. This library provides integration between Tapestry and JSR-303.</p><h2 id="BeanValidation-Configuration">Co
 nfiguration</h2><p>The Tapestry's JSR 303 - Bean Validation Library is responsible for configuring and bootstrapping the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a> for you. In order to use this library you have to choose an implementation of the JSR-303 specification like <a shape="rect" class="external-link" href="https://www.hibernate.org/412.html" >Hibernate Validator 4.x</a>. This library is not specific to any implementation of JSR-303 and will work with any implementation of your choice.</p><h3 id="BeanValidation-BootstrapingtheBeanValidator">Bootstraping the Bean Validator</h3><p>The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/BeanValidatorSource.html">BeanValidatorSource</a> service is responsible for bootstrapping the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/val
 idation/Validator.html" >Validator</a>. You can contribute a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/BeanValidatorConfigurer.html">BeanValidatorConfigurer</a> to the configuration of this service in order to participate on the configuration of <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Contribute(BeanValidatorSource.class)
+<div class="error"><span class="error">Error formatting macro: contentbylabel: com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not parse cql : null</span> </div></div><h1 id="BeanValidation-IntegrateJSR303-BeanValidationAPI">Integrate JSR 303 - Bean Validation API</h1><p>Tapestry provides a powerful validation mechanism (see <a shape="rect" href="forms-and-validation.html">Forms and Validation</a>). Among other things this mechanism allows you to annotate your domain model classes with the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beaneditor/Validate.html">@Validate</a> annotation. This annotation is problematic if your domain model is used in non-Tapestry applications as well as in Tapestry applications. Your non-Tapestry application becomes dependent on <em>tapestry5-annotations</em> module. To make your domain model independent from Tapestry you can use the <a shape="rect" class="external
 -link" href="http://jcp.org/en/jsr/detail?id=303" >JSR 303: Bean Validation</a>. This library provides integration between Tapestry and JSR-303.</p><h2 id="BeanValidation-Configuration">Configuration</h2><p>The Tapestry's JSR 303 - Bean Validation Library is responsible for configuring and bootstrapping the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a> for you. In order to use this library you have to choose an implementation of the JSR-303 specification like <a shape="rect" class="external-link" href="https://www.hibernate.org/412.html" >Hibernate Validator 4.x</a>. This library is not specific to any implementation of JSR-303 and will work with any implementation of your choice.</p><h3 id="BeanValidation-BootstrapingtheBeanValidator">Bootstraping the Bean Validator</h3><p>The <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/
 BeanValidatorSource.html">BeanValidatorSource</a> service is responsible for bootstrapping the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a>. You can contribute a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/BeanValidatorConfigurer.html">BeanValidatorConfigurer</a> to the configuration of this service in order to participate on the configuration of <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Contribute(BeanValidatorSource.class)
 public static void provideBeanValidatorConfigurer(OrderedConfiguration&lt;BeanValidatorConfigurer&gt; configuration)
 {
    configuration.add(&quot;MyConfigurer&quot;, new BeanValidatorConfigurer()
@@ -114,7 +76,7 @@ public static void provideBeanValidatorC
    });
 }]]></script>
 </div></div><h3 id="BeanValidation-Validationgroups">Validation groups</h3><p>In JSR-303 validation groups are used to define a subset of the constraints validated at a given time. If no validation group is specified the <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/groups/Default.html" >Default</a> group is taken. By default, Tapestry passes only this group to <a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/Validator.html" >Validator</a>. You can tell Tapestry to pass more groups by contributing group classes into the configuration of the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/BeanValidatorSource.html">BeanValidatorSource</a> service.</p><h2 id="BeanValidation-Usage">Usage</h2><h3 id="BeanValidation-ValidatingInputFields">Validating Input Fields</h3><p>Once you included this library and its dep
 endencies into your web app, you may use the JSR-303 annotations to validate the user's input.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class Login
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class Login
 {
    @NotNull
    @Size(max=10)
@@ -133,7 +95,7 @@ public static void provideBeanValidatorC
    }
 }]]></script>
 </div></div><p>You can even mix JSR-303 annotations and Tapestry's @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beaneditor/Validate.html">Validate</a> annotation.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class Login
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class Login
 {
    @NotNull
    @Validate(&quot;maxlength=10&quot;)
@@ -152,7 +114,7 @@ public static void provideBeanValidatorC
    }
 }]]></script>
 </div></div><p>Next you have to pass the object to validate into the Form's <em>validate</em> parameter. In the following example the Form's fields are bound to the properties of the <em>Login</em> page. That's why we pass <em>this</em>, thus the page instance, to the&#160; <em>validate</em> parameter.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;html xmlns:t=&quot;http://tapestry.apache.org/schema/tapestry_5_1_0.xsd&quot;&gt;
+<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;html xmlns:t=&quot;http://tapestry.apache.org/schema/tapestry_5_1_0.xsd&quot;&gt;
    &lt;body&gt;
       &lt;t:form validate=&quot;this&quot;&gt;
 
@@ -173,7 +135,7 @@ public static void provideBeanValidatorC
    &lt;/body&gt;
 &lt;/html&gt;]]></script>
 </div></div><p>Since the <em>validate</em> parameter defaults to the container of the Form component, we could also remove <em>validate="this"</em> in the example above.</p><h3 id="BeanValidation-ValidatingBeanswithBeanEditForm">Validating Beans with BeanEditForm</h3><p>If you use the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/BeanEditForm.html">BeanEditForm</a> component it's even easier to validate your beans. The only thing you have to do is to annotate your beans with JSR-303 annotations. If you are migrating from Tapestry's built-in validation mechanism to JSR-303 Bean Validation, you don't have to change your template at all.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class User
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class User
 {
    @NotNull
    private String userName;
@@ -185,7 +147,7 @@ public static void provideBeanValidatorC
    ...
 }]]></script>
 </div></div><h3 id="BeanValidation-Client-sideValidation">Client-side Validation</h3><p>Unfortunately JSR-303 doesn&#8217;t cover client-side validation, so web frameworks supporting this JSR need to come up with proprietary client-side solutions. Tapestry provides client-side validation for the following JSR-303 constraints:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>JSR-303 constraint</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Tapestry' JavaScript function</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/constraints/Max.html" >@Max</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Tapestry.Validator.maxnumber</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6
 /api/javax/validation/constraints/Min.html" >@Min</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Tapestry.Validator.minnumber</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/constraints/NotNull.html" >@NotNull</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Tapestry.Validator.notnull</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/constraints/Null.html" >@Null</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Tapestry.Validator.isnull</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/constraints/Pattern.html" >@Pattern</a></p></td><td colspan="1" rowspan="1" class="confluenceTd">
 <p>Tapestry.Validator.pattern</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" class="external-link" href="http://download.oracle.com/javaee/6/api/javax/validation/constraints/Size.html" >@Size</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Tapestry.Validator.size</p></td></tr></tbody></table></div><h3 id="BeanValidation-Providingownclient-sidevalidators">Providing own client-side validators</h3><p>Now let's see how to provide own client-side validation for JSR-303 constraints. Imagine you created the following constraint definition. The server-side implementation of the constraint is implemented by RangeValidator. I suppose you are familiar with JSR-303, so I don&#8217;t explain how to implement RangeValidator.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Documented
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Documented
 @Constraint(validatedBy = RangeValidator.class)
 @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
@@ -201,7 +163,7 @@ public @interface Range {
    Class[] payload() default {};
 }]]></script>
 </div></div><p>To provide client-side validation of a constraint you have to add a JavaScript function to the built-in <em>Tapestry.Validator</em> JavaScript-object. The function should contain exactly three parameters:</p><ol><li>Field being validated</li><li>Validation message</li><li>JSON object with values from the constraint annotation</li></ol><p>Here is an example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: js; gutter: false" type="syntaxhighlighter"><![CDATA[Tapestry.Validator.range = function(field, message, spec) {
+<script class="brush: js; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[Tapestry.Validator.range = function(field, message, spec) {
    field.addValidator(function(value) {
       if (value &lt; spec.min || value &gt; spec.max) {
          throw message;
@@ -209,7 +171,7 @@ public @interface Range {
    });
 };]]></script>
 </div></div><p>Now you have to tell Tapestry to call the function <em>Tapestry.Validator.range</em> when client-side validation of <em>@Range</em> should be executed. This is accomplished by a contribution to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/ClientConstraintDescriptorSource.html">ClientConstraintDescriptorSource</a> service. The configuration of this service is a collection of <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beanvalidator/ClientConstraintDescriptor.html">ClientConstraintDescriptor</a>. Each <em>ClientConstraintDescriptor</em> represents a client-side validation constraint. The constructor of <em>ClientConstraintDescriptor</em> has three parameters:</p><ol><li>Class of the constraint annotation.</li><li>Name of the JavaScript function.</li><li>The last parameter is a varargs. It is used to pass the attribute names of 
 the constraint annotation to be passed (along with their values) to the JavaScript function as an JSON object.</li></ol><p>The last step is to make the contribution, which links the <em>@Range</em> annotation with the JavaScript function <em>range</em>. The attributes <em>max</em> and <em>min</em> and their values are passed to the function.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Contribute(ClientConstraintDescriptorSource.class)
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Contribute(ClientConstraintDescriptorSource.class)
 public static void provideClientConstraintDescriptors(Configuration&lt;ClientConstraintDescriptor&gt; config) {
 
    config.add(new ClientConstraintDescriptor(Range.class, &quot;range&quot;, &quot;min&quot;, &quot;max&quot;));

Modified: websites/production/tapestry/content/beaneditform-faq.html
==============================================================================
--- websites/production/tapestry/content/beaneditform-faq.html (original)
+++ websites/production/tapestry/content/beaneditform-faq.html Sat Jun 27 21:21:02 2015
@@ -27,16 +27,6 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
-    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
-  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
-  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -55,7 +45,7 @@
   <input type="submit" value="Search">
 </form>
 
-</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">BeanEditForm FAQ</h1></div></div>
+</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">BeanEditForm FAQ</h1></div></div>
 <div class="clearer"></div>
 </div>
 
@@ -92,7 +82,7 @@ table.ScrollbarTable td.ScrollbarNextIco
 
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 public class MyBean {
    @Inject
    public MyBean() { ... }
@@ -110,7 +100,7 @@ public class MyBean {
 
 
 <div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 public class MyPage {
   @Property
   public MyBean myBean;

Modified: websites/production/tapestry/content/beaneditform-guide.html
==============================================================================
--- websites/production/tapestry/content/beaneditform-guide.html (original)
+++ websites/production/tapestry/content/beaneditform-guide.html Sat Jun 27 21:21:02 2015
@@ -27,16 +27,6 @@
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
 
-    <link href='/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
-  <link href='/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
-  <script src='/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='/resources/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -55,7 +45,7 @@
   <input type="submit" value="Search">
 </form>
 
-</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">BeanEditForm Guide</h1></div></div>
+</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">BeanEditForm Guide</h1></div></div>
 <div class="clearer"></div>
 </div>
 
@@ -72,7 +62,7 @@
     <a shape="rect" class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/input/edit1/1" >Edit (Using BeanEditForm)</a><br clear="none">
     <a shape="rect" class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/input/create1" >Create (Using BeanEditForm)</a><br clear="none">
     <a shape="rect" class="external-link" href="http://jumpstart.doublenegative.com.au/jumpstart/examples/input/morecontroledit1/1" >More Control Edit (Using BeanEditor)</a></p></div><p>BeanEditForm analyzes the the properties of the bean, locating just those properties that are readable and writeable. It filters down to properties whose type is mapped to a known editor (this is described in more detail below).</p><p>The default ordering for properties is in the order in which the <em>getter methods</em> for the properties are defined. When a super-class defines editable properties, those are ordered before sub-class properties.</p><h2 id="BeanEditFormGuide-SupportedTypes">Supported Types</h2><p>The default set of property types supported by BeanEditForm:</p><ul><li>String: as a text field</li><li>Number: as a text field</li><li>Enum: as a drop-down list</li><li>Boolean: as a checkbox</li><li>Date: as a JavaScript calendar</li><li>Calendar: as a JavaScript calendar</li></ul><p>Resol
 ving a property type to an editor type involves a search up the inheritance hierarchy: thus the super-type of Integer, Long, BigDecimal, etc. is Number, which uses a text field for data entry.</p><p>The list of supported property types is extensible (this is documented below).</p><h2 id="BeanEditFormGuide-AutomaticObjectCreation">Automatic Object Creation</h2><p>When a page is rendered, the BeanEditForm component will read its object parameter as the JavaBean to edit (with the current properties of the JavaBean becoming the defaults for the various fields). Likewise, when the form is submitted by the user, the object parameter is read and its properties populated from the request.</p><p>If the object does not exist, it will be created as needed. The type is determined from the property type, which should be a specific type in order for automatic creation to operate properly.</p><p>The BeanEditForm component will attempt to instantiate a value for the property as necessary, when the 
 form is submitted. This can be a problem when the property type is an interface, rather than an instantiable class.</p><p>One option is to provide an event handler for the "prepare" or "prepareForSubmit" events to instantiate an instance to receive the submitted information.</p><p>For a class, Tapestry will select the public constructor with the <em>most</em> parameters. If this is not desirable (for example, if you get an exception), then place the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">Inject</a> annotation on the constructor Tapestry should use.</p><h2 id="BeanEditFormGuide-ImplicitObjectBinding">Implicit Object Binding</h2><p>If the object parameter is not bound, then an implicit binding to a property of the containing component is made. The bound property will be the BeanEditForm component's id, if such a property exists. Thus you may typically give the BeanEditForm component an i
 d (that matches a property) and not have to bind the object parameter.</p><h2 id="BeanEditFormGuide-Non-VisualProperties">Non-Visual Properties</h2><p>In some cases, a property may be updatable and of a supported type for editing, but should not be presented to the user for editing: for example, a property that holds the primary key of a database entity. In such a case, the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beaneditor/NonVisual.html">NonVisual</a> annotation may be applied to the property (either the getter or the setter method).</p><h2 id="BeanEditFormGuide-DefaultValidation">Default Validation</h2><p>Default validation for fields is primary determined by property type.</p><p>If desired, additional validation may be specified using the @<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beaneditor/Validate.html">Validate</a> annotation. See <a shape="r
 ect" href="forms-and-validation.html">Forms and Validation</a>.</p><p>As of Tapestry 5.2, validation may also be specified via the containing component's property file, using a key in the form of <code>propertyId-validate</code> (eg: myfield-validate=required).</p><h2 id="BeanEditFormGuide-Propertyordering">Property ordering</h2><p>By default, the order in which properties are presented is as defined above (order of the getter method). This can be overridden using the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beaneditor/ReorderProperties.html">ReorderProperties</a> class annotation.</p><h2 id="BeanEditFormGuide-DefaultLabel">Default Label</h2><p>Tapestry will attempt to provide a reasonable default label for each field, based on the property name being emitted. The property name is capitalized, and spaces are added before case changes, thus property "name" becomes label "Name" and property "streetAddress" becomes labe
 l "Street Address".</p><p>BeanEditForm also searches for a label for the field in the containing component's message catalog. The message key is the property name suffixed with "-label". If such a label is found, it takes precedence.</p><h1 id="BeanEditFormGuide-PropertyEditorOverrides">Property Editor Overrides</h1><p>You may override the editor for any particular property, using the a block parameter to the BeanEditForm component.</p><p>An editor normally consists of a Label component and some form of field component (such as TextField or TextArea).</p><p>For example, you may want to selectively use a PasswordField component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  &lt;t:beaneditform object=&quot;loginCredentials&quot;&gt;
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  &lt;t:beaneditform object=&quot;loginCredentials&quot;&gt;
     &lt;p:password&gt;
       &lt;t:label for=&quot;password&quot;/&gt;
       &lt;t:passwordfield t:id=&quot;password&quot; value=&quot;loginCredentials.password&quot;/&gt;
@@ -80,7 +70,7 @@
   &lt;/t:beaneditform&gt;
 ]]></script>
 </div></div><p>The other fields will render normally (using the built-in editors).</p><h1 id="BeanEditFormGuide-CustomizingtheBeanModel">Customizing the BeanModel</h1><p>You may want to customize the BeanModel further, to remove from the form properties that should not be editable by the user, and to change the order in which properties are presented within the form.</p><p>The BeanEditForm component has several parameters for this purpose:</p><ul><li>add: A comma separated list of property names to add to the model.</li><li>include: A comma separated list of property names to keep with the model (others are excluded).</li><li>exclude: A comma separated list of property names to exclude from the model.</li><li>reorder: A comma separated list of property names indicating the desired order.<br clear="none"> If a model has more properties that are listed in the reorder parameter, then the additional properties will be ordered at the end of the form.</li></ul><p>Note that these parameter
 s <em>modify</em> the BeanModel. If you supply your own BeanModel (via the model parameter) you should not use the add, include, exclude or reorder parameters.</p><p>Added properties must not conflict with normal properties. Cells for added properties will render blank unless an override is provided.</p><h1 id="BeanEditFormGuide-ProvidingtheBeanModel">Providing the BeanModel</h1><p>The BeanEditForm component operates in terms of a <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/beaneditor/BeanModel.html">BeanModel</a>, which describes the properties, their presentation order, labels and so forth.</p><p>Normally, the BeanEditForm automatically creates the BeanModel as needed, based on the type of object bound to its object parameter.</p><p>Alternately, the BeanModel can be supplied as the model parameter. This can be useful in situations where the exclude and reorder parameters are insufficient. For example, if the the type 
 of the property being edited is an interface type, it may be useful to provide an explicit BeanModel around an underlying implementation class.</p><p>The model can be created when the page is first instantiated:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class MyPage
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class MyPage
 {
   @Inject
   private BeanModelSource beanModelSource;
@@ -104,16 +94,16 @@
 }
 ]]></script>
 </div></div><p>And, in the component template, the built model can be passed to the BeanEditForm component explicitly:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  &lt;t:beaneditform object=&quot;bean&quot; model=&quot;model&quot;/&gt;
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  &lt;t:beaneditform object=&quot;bean&quot; model=&quot;model&quot;/&gt;
 ]]></script>
 </div></div><h1 id="BeanEditFormGuide-AddingNewPropertyEditors">Adding New Property Editors</h1><p>Adding a new property editor is a three step process.</p><p>First, decide on a logical name for the data type. For example, you may decide that the BigDecimal type will represent currency in your application, so name the data type "currency".</p><p>Next, you must make contributions to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocsapidocs/org/apache/tapestry5/services/DataTypeAnalyzer.html">DataTypeAnalyzer</a> or <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/internal/services/DefaultDataTypeAnalyzer.html">DefaultDataTypeAnalyzer</a> services to match properties to your new name.</p><p>DataTypeAnalyzer is a chain of command that can match properties to data types based on property type or annotations on the property. In general, DefaultDataTypeAnalyzer is used, as that only needs to
  consider property type. DefaultDataTypeAnalyzer matches property types to data types, based on a search up the inheritance path.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public static void contributeDefaultDataTypeAnalyzer(MappedConfiguration&lt;Class, String&gt; configuration)
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public static void contributeDefaultDataTypeAnalyzer(MappedConfiguration&lt;Class, String&gt; configuration)
 {
   configuration.add(BigDecimal.class, &quot;currency&quot;);
 }
 ]]></script>
 </div></div><p>You must provide an editor for the "currency" data type. An editor is a block of a page of the application; this page is not normally rendered itself, but acts as a container for one or more blocks.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class AppPropertyEditBlocks
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class AppPropertyEditBlocks
 {
     @Property
     @Environmental
@@ -140,13 +130,13 @@
 }
 ]]></script>
 </div></div><p>The hard part is the translator; this is a piece of code that understands how to format and how to parse a currency value. It must be wrapped to create a FieldTranslator.</p><p>The editor is a block inside the component template:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[  &lt;t:block id=&quot;currency&quot;&gt;
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  &lt;t:block id=&quot;currency&quot;&gt;
     &lt;t:label for=&quot;currency&quot;/&gt;
     &lt;t:textfield t:id=&quot;currency&quot; size=&quot;10&quot;/&gt;
   &lt;/t:block&gt;
 ]]></script>
 </div></div><p>Finally, we tell the BeanEditForm component about the editor via a contribution to the <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/BeanBlockSource.html">BeanBlockSource</a> service:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public static void contributeBeanBlockSource(Configuration&lt;BeanBlockContribution&gt; configuration)
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public static void contributeBeanBlockSource(Configuration&lt;BeanBlockContribution&gt; configuration)
 {
   configuration.add(new BeanBlockContribution(&quot;currency&quot;, &quot;AppPropertyEditBlocks&quot;, &quot;currency&quot;, true));
 }

Modified: websites/production/tapestry/content/blogs.html
==============================================================================
--- websites/production/tapestry/content/blogs.html (original)
+++ websites/production/tapestry/content/blogs.html Sat Jun 27 21:21:02 2015
@@ -45,7 +45,7 @@
   <input type="submit" value="Search">
 </form>
 
-</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Blogs</h1></div></div>
+</div><div class="emblem" style="float:left"><p><a shape="rect" href="index.html"><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-external-resource" src="http://tapestry.apache.org/images/tapestry_small.png" data-image-src="http://tapestry.apache.org/images/tapestry_small.png"></span></a></p></div><div class="title" style="float:left; margin: 0 0 0 3em"><h1 id="SmallBanner-PageTitle">Blogs</h1></div></div>
 <div class="clearer"></div>
 </div>