tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r958985 [3/29] - in /websites/production/tapestry/content: ./ 2009/09/13/ 2009/10/27/ 2009/11/25/ 2010/07/18/ 2010/07/24/ 2010/10/11/ 2010/10/31/ 2010/11/18/ 2010/12/16/ 2010/12/17/ 2011/01/18/ 2011/03/23/ 2011/03/29/ 2011/03/30/ 2011/03/31...
Date Sun, 19 Jul 2015 21:21:30 GMT
Modified: websites/production/tapestry/content/autoloading-modules.html
==============================================================================
--- websites/production/tapestry/content/autoloading-modules.html (original)
+++ websites/production/tapestry/content/autoloading-modules.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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"/>
 
@@ -57,19 +67,11 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><style type="text/css">/*<![CDATA[*/
-table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
-table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
-table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-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="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 id="ConfluenceContent"><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 modules.</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">
+<pre class="brush: text; gutter: false; theme: Default" style="font-size:12px;">Manifest-Version: 1.0
+Tapestry-Module-Classes: org.example.mylib.LibModule, org.example.mylib.internal.InternalModule</pre>
 </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="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;project&gt;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;project&gt;
   . . .
   &lt;build&gt;
     &lt;plugins&gt;
@@ -88,22 +90,14 @@ Tapestry-Module-Classes: org.example.myl
     &lt;/plugins&gt;
   &lt;/build&gt;
   . . .
-&lt;/project&gt;]]></script>
+&lt;/project&gt;</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@SubModule(
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@SubModule(
 { InternalTransformModule.class })
 public final class InternalModule
 {
-  . . .]]></script>
-</div></div><p>In general, your should only need to identify a single module in the JAR manifest, and make use of @SubModule to pull in any additional module classes.</p><style type="text/css">/*<![CDATA[*/
-table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
-table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
-table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-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></div>
+  . . .</pre>
+</div></div><p>In general, your should only need to identify a single module in the JAR manifest, and make use of @SubModule to pull in any additional module classes.</p></div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/bean-validation.html
==============================================================================
--- websites/production/tapestry/content/bean-validation.html (original)
+++ websites/production/tapestry/content/bean-validation.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,17 @@
   </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"/>
 
@@ -64,23 +75,23 @@
 <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">
 <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)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Contribute(BeanValidatorSource.class)
 public static void provideBeanValidatorConfigurer(OrderedConfiguration&lt;BeanValidatorConfigurer&gt; configuration)
 {
-   configuration.add(&quot;MyConfigurer&quot;, new BeanValidatorConfigurer()
+   configuration.add("MyConfigurer", new BeanValidatorConfigurer()
    {
       public void configure(javax.validation.Configuration&lt;?&gt; configuration)
       {
          configuration.ignoreXmlConfiguration();
       }
    });
-}]]></script>
+}</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class Login
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class Login
 {
    @NotNull
    @Size(max=10)
-   @Pattern(regexp = &quot;[a-zA-Z]*&quot;)
+   @Pattern(regexp = "[a-zA-Z]*")
    @Property @Persist
    private String userName;
 
@@ -93,18 +104,18 @@ public static void provideBeanValidatorC
    {
       // Login the user here
    }
-}]]></script>
+}</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class Login
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class Login
 {
    @NotNull
-   @Validate(&quot;maxlength=10&quot;)
-   @Pattern(regexp = &quot;[a-zA-Z]*&quot;)
+   @Validate("maxlength=10")
+   @Pattern(regexp = "[a-zA-Z]*")
    @Property @Persist
    private String userName;
 
    @NotNull
-   @Validate(&quot;minlength=5,maxlength=30&quot;)
+   @Validate("minlength=5,maxlength=30")
    @Property @Persist
    private String password;
 
@@ -112,42 +123,42 @@ public static void provideBeanValidatorC
    {
       // Login the user here
    }
-}]]></script>
+}</pre>
 </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="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;
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"&gt;
    &lt;body&gt;
-      &lt;t:form validate=&quot;this&quot;&gt;
+      &lt;t:form validate="this"&gt;
 
          &lt;t:errors/&gt;
 
          &lt;p&gt;
-            &lt;t:textfield t:id=&quot;userName&quot;/&gt;
+            &lt;t:textfield t:id="userName"/&gt;
          &lt;/p&gt;
 
          &lt;p&gt;
-            &lt;t:textfield t:id=&quot;password&quot;/&gt;
+            &lt;t:textfield t:id="password"/&gt;
          &lt;/p&gt;
 
          &lt;p&gt;
-            &lt;input type=&quot;submit&quot; value=&quot;Login&quot;/&gt;
+            &lt;input type="submit" value="Login"/&gt;
          &lt;/p&gt;
       &lt;t:form&gt;
    &lt;/body&gt;
-&lt;/html&gt;]]></script>
+&lt;/html&gt;</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class User
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class User
 {
    @NotNull
    private String userName;
 
    @NotNull
-   @Validate(&quot;minlength=10&quot;)
+   @Validate("minlength=10")
    private String password;
 
    ...
-}]]></script>
+}</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Documented
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@Documented
 @Constraint(validatedBy = RangeValidator.class)
 @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
 @Retention(RUNTIME)
@@ -156,27 +167,27 @@ public @interface Range {
 
    long min() default Long.MIN_VALUE;
 
-   String message() default &quot;{com.acme.constraint.Range.message}&quot;;
+   String message() default "{com.acme.constraint.Range.message}";
 
    Class[] groups() default {};
 
    Class[] payload() default {};
-}]]></script>
+}</pre>
 </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="brush: js; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[Tapestry.Validator.range = function(field, message, spec) {
+<pre class="brush: js; gutter: false; theme: Default" style="font-size:12px;">Tapestry.Validator.range = function(field, message, spec) {
    field.addValidator(function(value) {
       if (value &lt; spec.min || value &gt; spec.max) {
          throw message;
       }
    });
-};]]></script>
+};</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@Contribute(ClientConstraintDescriptorSource.class)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@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;));
+   config.add(new ClientConstraintDescriptor(Range.class, "range", "min", "max"));
 }
-]]></script>
+</pre>
 </div></div></div>
 </div>
 

Modified: websites/production/tapestry/content/beaneditform-faq.html
==============================================================================
--- websites/production/tapestry/content/beaneditform-faq.html (original)
+++ websites/production/tapestry/content/beaneditform-faq.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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"/>
 
@@ -57,15 +67,7 @@
   </div>
 
 <div id="content">
-<div id="ConfluenceContent"><style type="text/css">/*<![CDATA[*/
-table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
-table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
-table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-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="forms-and-form-components-faq.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="forms-and-form-components-faq.html">Forms and Form Components FAQ</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="frequently-asked-questions.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="frequently-asked-questions.html">Frequently Asked Questions</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="link-components-faq.html">Link Components FAQ</a></td><td colspan="1" rowspan="1
 " class="ScrollbarNextIcon"><a shape="rect" href="link-components-faq.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> 
+<div id="ConfluenceContent"> 
 
 <h2 id="BeanEditFormFAQ-BeanEditForm">BeanEditForm </h2>
 
@@ -82,7 +84,7 @@ table.ScrollbarTable td.ScrollbarNextIco
 
 
 <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[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
 public class MyBean {
    @Inject
    public MyBean() { ... }
@@ -93,25 +95,25 @@ public class MyBean {
 
    ...
 }
-]]></script>
+</pre>
 </div></div>
 
 <ul><li>Provide an event handler method for the "prepare" event, and put an instantiated instance into the property.</li></ul>
 
 
 <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[
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
 public class MyPage {
   @Property
   public MyBean myBean;
 
-  // The template contains &lt;t:beaneditform t:id=&quot;mybeaneditor&quot;/&gt; ...
+  // The template contains &lt;t:beaneditform t:id="mybeaneditor"/&gt; ...
 
   void onPrepareFromMyBeanEditor() {
     myBean = new MyBean();
   }
 }
-]]></script>
+</pre>
 </div></div>
 
 <h3 id="BeanEditFormFAQ-What'sthedifferencebetweenBeanEditorandBeanEditForm?">What's the difference between BeanEditor and BeanEditForm?</h3>
@@ -121,16 +123,7 @@ public class MyPage {
 <h3 id="BeanEditFormFAQ-HowdoIcustomizethelayoutoftheBeanEditForm?">How do I customize the layout of the BeanEditForm?</h3>
 
 <p>The BeanEditForm is a <em>scaffolding</em> component; it exists to get things up and running quickly. It can be customized visually using CSS, and can be configured and extended in a number of ways ... but ultimately, if you want fine control, you should use the underlying Form, TextField and other components directly.</p>
-
-<style type="text/css">/*<![CDATA[*/
-table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color: #f0f0f0}
-table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
-table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
-table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
-table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
-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="forms-and-form-components-faq.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="forms-and-form-components-faq.html">Forms and Form Components FAQ</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="frequently-asked-questions.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="frequently-asked-questions.html">Frequently Asked Questions</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="link-components-faq.html">Link Components FAQ</a></td><td colspan="1" rowspan="1
 " class="ScrollbarNextIcon"><a shape="rect" href="link-components-faq.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></div>
+</div>
 </div>
 
 <div class="clearer"></div>

Modified: websites/production/tapestry/content/beaneditform-guide.html
==============================================================================
--- websites/production/tapestry/content/beaneditform-guide.html (original)
+++ websites/production/tapestry/content/beaneditform-guide.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,16 @@
   </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"/>
 
@@ -62,15 +72,15 @@
     <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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  &lt;t:beaneditform object=&quot;loginCredentials&quot;&gt;
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  &lt;t:beaneditform object="loginCredentials"&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;
+      &lt;t:label for="password"/&gt;
+      &lt;t:passwordfield t:id="password" value="loginCredentials.password"/&gt;
     &lt;/p:password&gt;
   &lt;/t:beaneditform&gt;
-]]></script>
+</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class MyPage
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class MyPage
 {
   @Inject
   private BeanModelSource beanModelSource;
@@ -92,27 +102,27 @@
   }  
 
 }
-]]></script>
+</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  &lt;t:beaneditform object=&quot;bean&quot; model=&quot;model&quot;/&gt;
-]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  &lt;t:beaneditform object="bean" model="model"/&gt;
+</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public static void contributeDefaultDataTypeAnalyzer(MappedConfiguration&lt;Class, String&gt; configuration)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public static void contributeDefaultDataTypeAnalyzer(MappedConfiguration&lt;Class, String&gt; configuration)
 {
-  configuration.add(BigDecimal.class, &quot;currency&quot;);
+  configuration.add(BigDecimal.class, "currency");
 }
-]]></script>
+</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class AppPropertyEditBlocks
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public class AppPropertyEditBlocks
 {
     @Property
     @Environmental
     private PropertyEditContext context;
   
     @Component(parameters =
-    { &quot;value=context.propertyValue&quot;, &quot;label=prop:context.label&quot;,
-            &quot;translate=prop:currencyTranslator&quot;, &quot;validate=prop:currencyValidator&quot;,
-            &quot;clientId=prop:context.propertyId&quot;, &quot;annotationProvider=context&quot; })
+    { "value=context.propertyValue", "label=prop:context.label",
+            "translate=prop:currencyTranslator", "validate=prop:currencyValidator",
+            "clientId=prop:context.propertyId", "annotationProvider=context" })
     private TextField currency;
 
     @Inject
@@ -128,19 +138,19 @@
       return context.getTranslator(current);
     }
 }
-]]></script>
+</pre>
 </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="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;
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  &lt;t:block id="currency"&gt;
+    &lt;t:label for="currency"/&gt;
+    &lt;t:textfield t:id="currency" size="10"/&gt;
   &lt;/t:block&gt;
-]]></script>
+</pre>
 </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="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public static void contributeBeanBlockSource(Configuration&lt;BeanBlockContribution&gt; configuration)
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public static void contributeBeanBlockSource(Configuration&lt;BeanBlockContribution&gt; configuration)
 {
-  configuration.add(new BeanBlockContribution(&quot;currency&quot;, &quot;AppPropertyEditBlocks&quot;, &quot;currency&quot;, true));
+  configuration.add(new BeanBlockContribution("currency", "AppPropertyEditBlocks", "currency", true));
 }
-]]></script>
+</pre>
 </div></div><p>Now, when the BeanEditForm sees a property of type BigDecimal, it will map that to datatype "currency" and from there to the currency block of the AppPropertyEditBlocks page of the application.</p></div>
 </div>
 

Modified: websites/production/tapestry/content/books.html
==============================================================================
--- websites/production/tapestry/content/books.html (original)
+++ websites/production/tapestry/content/books.html Sun Jul 19 21:21:27 2015
@@ -68,7 +68,7 @@
 <h3 id="Books-Tapestry5-RapidwebapplicationdevelopmentinJava">Tapestry 5 - Rapid web application development in Java</h3>
 
 <div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro" style="width:20%;min-width:20%;max-width:20%;">
-<p><a shape="rect" class="external-link" href="http://www.tapestry5book.com/" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/tapestry5-rapid.jpg" data-image-src="/confluence/download/attachments/24185597/tapestry5-rapid.jpg?version=1&amp;modificationDate=1345001381000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="30343189" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="tapestry5-rapid.jpg" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="24185597" data-linked-resource-container-version="19"></span></a></p></div><div class="columnMacro">
+<p><a shape="rect" class="external-link" href="http://www.tapestry5book.com/" ><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/tapestry5-rapid.jpg"></span></a></p></div><div class="columnMacro">
 <ul><li><strong>Covers:</strong> Tapestry 5 (Version 5.3)</li><li><strong>Published:</strong> 2012</li><li><strong>Author:</strong> Igor Drobiazko</li><li><strong>Language:</strong> English</li><li><strong>Pages:</strong> 482</li><li><strong>More information:</strong> <a shape="rect" class="external-link" href="http://www.tapestry5book.com/" >http://www.tapestry5book.com/</a></li></ul>
 </div></div></div></div>
 
@@ -82,7 +82,7 @@
 <h3 id="Books-Tapestry5:DieEntwicklungvonWebanwendungenmitLeichtigkeit">Tapestry 5: Die Entwicklung von Webanwendungen mit Leichtigkeit</h3>
 
 <div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro" style="width:20%;min-width:20%;max-width:20%;">
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-content-image-border" src="books.data/tapestry5-drobiazko.jpg" data-image-src="/confluence/download/attachments/24185597/tapestry5-drobiazko.jpg?version=1&amp;modificationDate=1289142702000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346794" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="tapestry5-drobiazko.jpg" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="24185597" data-linked-resource-container-version="19"></span></p></div><div class="columnMacro">
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-content-image-border" src="books.data/tapestry5-drobiazko.jpg"></span></p></div><div class="columnMacro">
 <ul><li><strong>Covers:</strong> Tapestry 5 (Version 5.1.0.5)</li><li><strong>Published:</strong> 2009</li><li><strong>Author:</strong> Igor Drobiazko</li><li><strong>Language:</strong> German</li></ul>
 </div></div></div></div>
 
@@ -93,7 +93,7 @@
 <h3 id="Books-Tapestry5:BuildingWebApplications">Tapestry 5: Building Web Applications</h3>
 
 <div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro" style="width:20%;min-width:20%;max-width:20%;">
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/packtpub_cover.png" data-image-src="/confluence/download/attachments/24185597/packtpub_cover.png?version=1&amp;modificationDate=1289142702000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346795" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="packtpub_cover.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24185597" data-linked-resource-container-version="19"></span></p></div><div class="columnMacro">
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/packtpub_cover.png"></span></p></div><div class="columnMacro">
 <ul><li><strong>Covers:</strong> Tapestry 5</li><li><strong>Published:</strong> 2008</li><li><strong>Author:</strong> Alexander Kolesnikov</li><li><strong>Language:</strong> English</li></ul>
 </div></div></div></div>
 
@@ -102,7 +102,7 @@
 <h3 id="Books-TapestryCompleteReference">Tapestry Complete Reference</h3>
 
 <div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro" style="width:20%;min-width:20%;max-width:20%;">
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/t4chinese.jpg" data-image-src="/confluence/download/attachments/24185597/t4chinese.jpg?version=1&amp;modificationDate=1289142702000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346796" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="t4chinese.jpg" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="24185597" data-linked-resource-container-version="19"></span></p></div><div class="columnMacro">
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/t4chinese.jpg"></span></p></div><div class="columnMacro">
 <ul><li><strong>Covers:</strong> Tapestry 4</li><li><strong>Published:</strong> 2007</li><li><strong>Author:</strong> A. Dong</li><li><strong>Language:</strong> Chinese</li></ul>
 </div></div></div></div>
 
@@ -111,7 +111,7 @@
 <h3 id="Books-Tapestry101">Tapestry 101</h3>
 
 <div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro" style="width:20%;min-width:20%;max-width:20%;">
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/tapestry101.jpg" data-image-src="/confluence/download/attachments/24185597/tapestry101.jpg?version=1&amp;modificationDate=1289142702000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346797" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="tapestry101.jpg" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="24185597" data-linked-resource-container-version="19"></span></p></div><div class="columnMacro">
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/tapestry101.jpg"></span></p></div><div class="columnMacro">
 <ul><li><strong>Covers:</strong> Tapestry 4 (Spring/Hibernate/Hivemind/Tacos(ajax)</li><li><strong>Publisher:</strong> SourceBeat</li><li><strong>Published:</strong> 2006</li><li><strong>Authors:</strong> Warner Onstine</li></ul>
 </div></div></div></div>
 
@@ -126,7 +126,7 @@
 <h3 id="Books-BeginningPOJOs:LightweightJavaWebDevelopmentUsingPlainOldJavaObjectsinSpring,Hibernate,andTapestry">Beginning POJOs: Lightweight Java Web Development Using Plain Old Java Objects in Spring, Hibernate, and Tapestry</h3>
 
 <div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro" style="width:20%;min-width:20%;max-width:20%;">
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/beginning-pojos.gif" data-image-src="/confluence/download/attachments/24185597/beginning-pojos.gif?version=1&amp;modificationDate=1289142702000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346798" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="beginning-pojos.gif" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/gif" data-linked-resource-container-id="24185597" data-linked-resource-container-version="19"></span></p></div><div class="columnMacro">
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/beginning-pojos.gif"></span></p></div><div class="columnMacro">
 <ul><li><strong>Covers:</strong> Tapestry 4</li><li><strong>Publisher:</strong> Apress</li><li><strong>Published:</strong> 2006</li><li><strong>Authors:</strong> Brian Sam-Bodden</li></ul>
 </div></div></div></div>
 
@@ -137,7 +137,7 @@
 <h3 id="Books-EnjoyingWebDevelopmentwithTapestry">Enjoying Web Development with Tapestry</h3>
 
 <div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro" style="width:20%;min-width:20%;max-width:20%;">
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/ewdt_tong_cover.jpg" data-image-src="/confluence/download/attachments/24185597/ewdt_tong_cover.jpg?version=1&amp;modificationDate=1289142703000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346799" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="ewdt_tong_cover.jpg" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/jpeg" data-linked-resource-container-id="24185597" data-linked-resource-container-version="19"></span></p></div><div class="columnMacro">
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image" src="books.data/ewdt_tong_cover.jpg"></span></p></div><div class="columnMacro">
 <ul><li><strong>Covers:</strong> Tapestry 4.1/4/3</li><li><strong>Publisher:</strong> Agile Skills</li><li><strong>Published:</strong> 2006</li><li><strong>Authors:</strong> <a shape="rect" class="external-link" href="http://www.agileskills2.org/EWDT/" >Kent Tong</a></li></ul>
 </div></div></div></div>
 
@@ -148,7 +148,7 @@
 <h3 id="Books-TapestryWebanwendungenmitdemApacheFramework">Tapestry Webanwendungen mit dem Apache Framework</h3>
 
 <div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro" style="width:20%;min-width:20%;max-width:20%;">
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-content-image-border" src="books.data/tapestry-german-cover.gif" data-image-src="/confluence/download/attachments/24185597/tapestry-german-cover.gif?version=1&amp;modificationDate=1289142703000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346800" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="tapestry-german-cover.gif" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/gif" data-linked-resource-container-id="24185597" data-linked-resource-container-version="19"></span></p></div><div class="columnMacro">
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-content-image-border" src="books.data/tapestry-german-cover.gif"></span></p></div><div class="columnMacro">
 <ul><li><strong>Covers:</strong> Tapestry 3</li><li><strong>Publisher:</strong> S&amp;S</li><li><strong>Published:</strong> 2004</li><li><strong>Authors:</strong> Stefan Edlich,Patrick Kunert</li></ul>
 </div></div></div></div>
 
@@ -159,7 +159,7 @@
 <h3 id="Books-TapestryinAction">Tapestry in Action</h3>
 
 <div class="sectionColumnWrapper"><div class="sectionMacro"><div class="sectionMacroRow"><div class="columnMacro" style="width:20%;min-width:20%;max-width:20%;">
-<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-content-image-border" src="books.data/tapestry-in-action.png" data-image-src="/confluence/download/attachments/24185597/tapestry-in-action.png?version=1&amp;modificationDate=1289142703000&amp;api=v2" data-unresolved-comment-count="0" data-linked-resource-id="24346801" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="tapestry-in-action.png" data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="24185597" data-linked-resource-container-version="19"></span></p></div><div class="columnMacro">
+<p><span class="confluence-embedded-file-wrapper"><img class="confluence-embedded-image confluence-content-image-border" src="books.data/tapestry-in-action.png"></span></p></div><div class="columnMacro">
 <ul><li><strong>Covers:</strong> Tapestry 3</li><li><strong>Publisher:</strong> Manning Publications</li><li><strong>Published:</strong> 2004</li><li><strong>Authors:</strong> <a shape="rect" class="external-link" href="http://howardlewisship.com/" >Howard M. Lewis Ship</a></li></ul>
 </div></div></div></div>
 

Modified: websites/production/tapestry/content/building-tapestry-from-source.html
==============================================================================
--- websites/production/tapestry/content/building-tapestry-from-source.html (original)
+++ websites/production/tapestry/content/building-tapestry-from-source.html Sun Jul 19 21:21:27 2015
@@ -27,6 +27,14 @@
   </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 type="text/javascript">
+  SyntaxHighlighter.defaults['toolbar'] = false;
+  SyntaxHighlighter.all();
+  </script>
 
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
 
@@ -58,21 +66,21 @@
 
 <div id="content">
 <div id="ConfluenceContent"><p>This is a guide to building Tapestry itself from source code. This is primarily of interest to Tapestry <em>contributors</em>, rather than Tapestry <em>users</em>.</p><p>Although Tapestry <em>users</em> are free to use any build mechanism for their own projects (and first class Maven support is provided), to build Tapestry itself from source you will use Gradle.</p><p>Note: Both command line and Eclipse Gradle IDE/EGit instructions are given here. Generally you'll want to chose approach one or the other, rather than mixing them.</p><h2 id="BuildingTapestryfromSource-Prerequisites">Prerequisites</h2><ul><li>Install a Java JDK (Sun/Oracle, not OpenJDK), version 1.7 (just to prevent VU#225657, see: <a shape="rect" class="external-link" href="http://www.kb.cert.org/vuls/id/225657" >http://www.kb.cert.org/vuls/id/225657</a>).</li><li>Install an IDE (IDEA IntelliJ is recommended (and free to Tapestry committers), but Eclipse will also work. NetBeans is repor
 ted to work as well.</li><li>Install Firefox browser <span style="text-decoration: line-through;">version 3.6</span>, needed for the integration tests.</li><li>Set the Firefox browser's "preferred language" to English (en), because some tests will otherwise fail. (Fixed; see <a shape="rect" class="external-link" href="https://issues.apache.org/jira/browse/TAP5-2413">TAP5-2413</a>)</li><li>Install a Git client<ul><li>Command-line users: <a shape="rect" class="external-link" href="http://git-scm.com/downloads" >http://git-scm.com/downloads</a></li><li>Eclipse users: Install EGit from the Eclipse Marketplace, then in In Window &gt; Preferences &gt; Team &gt; Git, set your "Default repository folder" (e.g. <code>~/git</code> or <code>%HOME%\git</code>). Note that for Eclipse 4.4 (Luna) and later this is already done.</li></ul></li><li>Install Gradle 1.0-milestone-3 or newer (or a Gradle plugin to your IDE),<ul><li>Command-line users: <a shape="rect" class="external-link" href="http://ww
 w.gradle.org/downloads" >http://www.gradle.org/downloads</a></li><li>Eclipse users: Install Gradle IDE (aka Gradle Integration for Eclipse), from the Eclipse Marketplace</li></ul></li></ul><h2 id="BuildingTapestryfromSource-GettingStarted">Getting Started</h2><p>Please read <a shape="rect" class="external-link" href="https://git-wip-us.apache.org/">https://git-wip-us.apache.org/</a> first.</p><p>Windows users (especialy EGit users) should probably set the core.autocrlf config setting to <code>false</code> so that local diffs won't highlight line ending differences.</p><h3 id="BuildingTapestryfromSource-ClonetheRepository">Clone the Repository</h3><p>Clone Tapestry from the Git repo:</p><ul><li><p>Command-line git users:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Non Committers:</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>git clone</p><a shape="rect" class="external-link" href="http://git-wi
 p-us.apache.org/repos/asf/tapestry-5.git">http://git-wip-us.apache.org/repos/asf/tapestry-5.git</a><p>&#160;</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Committers:</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>git clone</p><a shape="rect" class="external-link" href="https://git-wip-us.apache.org/repos/asf/tapestry-5.git">https://git-wip-us.apache.org/repos/asf/tapestry-5.git</a><p>&#160;</p></td></tr></tbody></table></div></li><li>Eclipse EGit users:<ul><li>Switch to Git perspective; then copy one of the URLs above into paste buffer</li><li>Right-click &gt; Paste repository path or URI. This will bring up the Clone Git Repository dialog.</li><li>Committers: make sure Protocol is https, and enter your Apache commiter LDAP user name &amp; password</li><li>click Next.</li><li>Select the branches you're interested in (e.g 5.3 and master), click Next</li><li>Select Directory to where you want the project source code (e.g. <code>~/git/tapestry-5</co
 de> or <code>%HOME%\git\tapestry-5</code>)</li><li>Select whichever "Initial Branch" you're interested in (e.g. master)</li><li>Set "Remote name" to "origin" (the default)</li><li><strong>VERY IMPORTANT</strong>: uncheck the "Import all existing projects" checkbox (we'll do this using Gradle, below)</li><li>Click Finish. (Be patient; the clone operation might take a few minutes.)</li></ul></li></ul><h3 id="BuildingTapestryfromSource-GradlePreparation">Gradle Preparation</h3><ul><li>Command-line gradle users only:<ul><li>If you're using Eclipse but <strong>not</strong> Gradle IDE do <code>./gradlew eclipse</code></li><li>The command-line Gradle's eclipse plugin doesn't include the provided project dependencies; you need to add them manually (Java Build Path &gt; Projects &gt; Add tapestry-test). The plugin also generates a root eclipse project, so you'll need to delete the ".project" file in the root folder, and then you can import all Tapestry sub-projects at once.</li></ul></li><li
 >Eclipse Gradle IDE users:<ul><li>Switch to Java (or JEE) perspective and right-click &gt; Import... &gt; Gradle &gt; Gradle Project &gt; Next.</li><li>Set the "Root folder" to where you put your Tapestry source in the previous section (e.g. <code>~/git/tapestry-5</code> or <code>%Home%\git\tapestry-5</code>)</li><li>Click <code>Build Model. When it completes, s</code>elect the top-level (the top-level module and all sub-modules).</li><li>Be sure the "Enable dependency management" and "Create workingset 'tapestry-5' checkboxes are checked.</li><li>Click <code>Finish</code>. (Be patient; the import operation might take a few minutes.)</li></ul></li><li>Eclipse EGit users: Do a Git "Share" on the project:<ul><li>Still in the Java (or JEE) perspective, select all of the Tapestry projects (top-level and sub-modules) and right-click &gt; Team &gt; Share Project... &gt; Git &gt; Next &gt; Ensure all are selected, click <code>Finish</code>.</li></ul></li></ul><h3 id="BuildingTapestryfromSo
 urce-Antlr">Antlr</h3><p>The <code>tapestry-core</code> project will initially have errors because of missing Java classes that are produced by ANTLR the first time the project is built. To fix this:</p><ul><li>Eclipse Gradle IDE users:<ul><li>Right click on the <code>build.gradle</code> file within tapestry-core and click Run As &gt; "Gradle build...", check <strong>only</strong> the generateGrammarSource task, and change the "Name" field to something like "tapestry-core antlr", then click Apply and Run.</li><li>When it's finished, the antlr-generated classes (e.g. PropertyExpressionLexer.java) will be in created in $buildDir/generated-sources/antlr/, but Eclipse doesn't yet know about that path. To fix that, right click on the <code>tapestry-core</code> project &gt; Properties &gt; Java Build Path &gt; Source &gt; Add Folder &gt; find <code>tapestry-core/build/generated-sources/antlr</code> and check the checkbox next to it, then click <code>OK</code>.</li></ul></li></ul><h3 id="B
 uildingTapestryfromSource-CoffeeScript">CoffeeScript</h3><p>If you want to run tests from within Eclipse, Tapestry will complain that it won't find certain JavaScript files that normally are generated during compile time from their Coffeescript sources. In order to generate the JavaScript files you need to have Coffeescript installed and in your path. Simply install <a shape="rect" class="external-link" href="http://nodejs.org/download/" >Node.js</a> and afterwards run <code>npm install -g coffee-script</code>. The installation should take care of everything.</p><ul><li>Eclipse Gradle IDE users:<ul><li>Right click on the <code>build.gradle</code> file within tapestry-core and click Run As &gt; "Gradle build...", check <strong>only</strong> the tapestry-core:compileCoffeeScript and tapestry-core:compileTestCoffeeScript tasks, and change the "Name" field to something like "tapestry-core coffeescript", then click Apply and Run.</li><li>When it's finished, the coffeescript-generated Jav
 aScript files (e.g. t5-core-dom-jquery.js) will be in created in $buildDir/generated-sources/compiled-coffeescript/ and $buildDir/generated-sources/compiled-test-coffeescript/, but Eclipse doesn't yet know about that path. To fix that, right click on the <code>tapestry-core</code> project &gt; Properties &gt; Java Build Path &gt; Source &gt; Add Folder &gt; find <code>tapestry-core/build/generated-sources/compiled-coffeescript</code> and <code>tapestry-core/build/generated-sources/compiled-test-coffeescript</code> and check the checkbox next to it, then click <code>OK</code>.</li></ul></li></ul><h3 id="BuildingTapestryfromSource-GenerateCoffeeScriptandAntlrfilesautomaticallywhenchanged">Generate CoffeeScript and Antlr files automatically when changed</h3><p>If you want to have Eclipse compile the JavaScript files and lexer classes from their Coffeescript sources and Antlr files automatically when they change, you can do that by configuring an additional builder for the <code>tapestr
 y-core</code> project:</p><ul><li>Eclipse Gradle IDE users:<ul><li>Right click on the <code>tapestry-core</code> project and select properties.</li><li>Select the "Builders" entry from the list on the left and click "New.." in the right panel.</li><li>Select "Program" and click "Ok".</li><li>Give the program a meaningful name, e.g. "compile coffeescript and antlr".</li><li>Switch to the "Main" tab.</li><li>For "Location:" click "Browse Workspace..." and select <code>gradlew.sh</code> or <code>gradlew.bat</code> in the Tapestry root project. If the root project is called "tapestry-5" the entry should look similar to "${workspace_loc:/tapestry-5/gradlew.bat}".</li><li>For "Working Directory:" click "Browse Workspace..." and select the Tapestry root project.</li><li>For "Arguments:" enter <code>tapestry-core:generateGrammarSource tapestry-core:compileCoffeeScript tapestry-core:compileTestCoffeeScript</code>.</li><li>Switch to the "Build Options" tab.</li><li>Make sure that only "Alloca
 te Console", "After a "Clean"", "During manual builds", "During auto builds" and "Specify working set of relevant resources" are checked.</li><li>Click "Specify Resources...".</li><li>From the "tapestry-core" project select "src/main/antlr", "src/main/coffeescript", and "src/test/coffeescript".</li><li>Click "Finish".</li><li>Click "OK".</li><li>Click "OK".</li></ul></li></ul><h3 id="BuildingTapestryfromSource-Building">Building</h3><p>You can build individual modules, or (from the root folder) build everything.</p><ul><li>Command-line users:<br clear="none"> *( "gradlew" is the gradle wrapper shell script (gradlew) or batch file (gradlew.bat) found in the root folder of the Tapestry source.<ul><li><code>./gradlew build</code></li></ul></li><li>Eclipse Gradle IDE users:<ul><li>Right click on the top-level project (or any sub-project) and select Run As &gt; Gradle Build..., which starts an External Tools Configuration dialog box. Enter a reasonable name, select the tasks you want to 
 run (for example, tapestry-core/install), and click Run.</li></ul></li></ul><h3 id="BuildingTapestryfromSource-SeleniumSetup">Selenium Setup</h3><p>It is necessary that you have a compatible version of Firefox installed. &#160;On a Mac, you should install it in ~/Applications (rather than /Applications).</p><p>You should modify your ~/.bash_profile (or equivalent), to add ~/Applications/Firefox.app/Contents/MacOS to the PATH variable.</p><h3 id="BuildingTapestryfromSource-RunningIndividualTests">Running Individual Tests</h3><p>Eclipse users:</p><ul><li>Install the <a shape="rect" class="external-link" href="http://testng.org/doc/eclipse.html" >TestNG plugin</a> to allow running of individual TestNG unit tests from within in Eclipse.</li><li>Right-click on any test class and select Run As &gt;TestNG Test</li></ul><p>Command-line users:</p><ul><li>./gradlew -Dtest.single=myclassname</li><li>./gradlew -Dtest.single=myclassname.mymethod</li></ul><p>where myclassname is the test class, s
 uch as FormTest</p><p>The Tapestry integration tests will repeatedly start up a Firefox browser.</p><ul><li>Ensure that your environment will allow a connection to <a shape="rect" class="external-link" href="https://localhost:443" >https://localhost:443</a></li></ul><h3 id="BuildingTapestryfromSource-SkippingTests">Skipping Tests</h3><p>Running the Tapestry integration tests can take 10 minutes or more (mostly because of Selenium tests, which repeatedly start and stop the Firefox browser), so you won't want to run them every time you try a change.</p><ul><li>Command-line users:<ul><li><code>To build while skipping all tests: ./gradlew build -x test</code></li><li>You can skip tests on a specific module by adding a colon and the module name. For example: <code>-x test:tapestry-ioc</code></li></ul></li><li>Eclipse Gradle IDE users:<ul><li>In your External Tools Configuration, add the same -x test option as above at Arguments &gt; Program Arguments.</li></ul></li></ul><h3 id="BuildingT
 apestryfromSource-RunningtheIntegrationTestAppsManually">Running the Integration Test Apps Manually</h3><p>The Tapestry source includes several web apps that are used by the automated Selenium integration tests. You can also run these apps manually to try out nearly every browser-visible aspect of Tapestry.</p><ul><li>If using Eclipse:<ul><li>Use the run-jetty-run plugin in Eclipse, with the context directory selected from among the <code>test</code> context directories. For example, in the tapestry-core module, right click on the /src/test/app1 (or app2, etc) folder, and select Run As &gt; Run Jetty, then open your browser to <a shape="rect" class="external-link" href="http://localhost:8080/tapestry-core" >http://localhost:8080/tapestry-core</a></li></ul></li></ul><h3 id="BuildingTapestryfromSource-MakingCodeChanges">Making Code Changes</h3><p>Once you have cloned or pulled the latest changes to your local Git repository, you can start working on it. Whenever you make some changes 
 to the codebase, it's good to have a related issue filed in JIRA and to use a similarly named branch in your local Git repository. For example, to create a branch for an issue with the key TAP5-123:</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[git branch TAP5-123 origin/master]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git branch TAP5-123 origin/master</pre>
 </div></div><p>With per-issue branches you can easily switch back and forth between different issues without worrying about unwanted side-effects from unfinished changes to other issues. Whenever you want to work on the TAP5-123 example issue, simply checkout that branch and start making your changes:</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[git checkout TAP5-123]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git checkout TAP5-123</pre>
 </div></div><p>It's a good idea to commit your changes to your local Git repo whenever you have finished one logical part of the issue. For example when refactoring, make a new commit for each refactoring step you take.</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[git commit]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git commit</pre>
 </div></div><h3 id="BuildingTapestryfromSource-Pushingyourcommitsupstream">Pushing your commits upstream</h3><p>First:</p><ul><li>Run the full suite of tests before pushing your commits to the upstream (remote) repository.</li><li>Ensure your changes have full test coverage</li><li>Ensure you have set your local repo to track the official Tapestry repo as its upstream repository.</li></ul><p>Then:</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[git push]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git push</pre>
 </div></div><h3 id="BuildingTapestryfromSource-ProducingPatches">Producing Patches</h3><p>If you aren't an official committer (with write access to the Apache Tapestry Git repo), you'll need to submit changes via a patch.<br clear="none"> See the recommendations at <a shape="rect" class="external-link" href="http://commons.apache.org/patches.html">http://commons.apache.org/patches.html</a>. (Obviously that isn't specifically for the Tapestry project, but most of the same principles apply.)</p><p>You can use the git format-patch command to produce a nice set of patches to attach to the relevant issue in JIRA:</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[git format-patch origin/master
-]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">git format-patch origin/master
+</pre>
 </div></div><p>The sooner you share your work the better. You can repeat the steps of this workflow as often as you like, producing more patches to be attached to the issue tracker. Once some of your patches are accepted and applied by a committer, you can rebase your work against the latest trunk. Alternatively, if you're asked to make some changes, you can go back to the original Git commit and modify it until the project team accepts your changes.</p><h3 id="BuildingTapestryfromSource-TroubleshootingHints">Troubleshooting Hints</h3><p><strong>Problem:</strong> I can't run the build. it gives me an error in line 91:</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[20:22:11.438 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
-20:22:11.439 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project &#39;tapestry-project-trunk&#39;.
-20:22:11.440 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Cannot get property &#39;plus&#39; on null object
-]]></script>
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">20:22:11.438 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
+20:22:11.439 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project 'tapestry-project-trunk'.
+20:22:11.440 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Cannot get property 'plus' on null object
+</pre>
 </div></div><p><strong>Solution:</strong> Use the gradle wrapper (./gradlew build), not plain "gradle".</p></div>
 </div>
 



Mime
View raw message