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 2013/09/23 00:21:27 UTC

svn commit: r879492 [29/30] - in /websites/production/tapestry/content: ./ 2009/ 2009/09/ 2009/09/13/ 2009/10/ 2009/10/27/ 2009/11/ 2009/11/25/ 2010/ 2010/07/ 2010/07/18/ 2010/07/24/ 2010/10/ 2010/10/11/ 2010/10/31/ 2010/11/ 2010/11/18/ 2010/11/19/ 201...

Modified: websites/production/tapestry/content/uploading-files.html
==============================================================================
--- websites/production/tapestry/content/uploading-files.html (original)
+++ websites/production/tapestry/content/uploading-files.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,19 @@
     Uploading Files -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushXml.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"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +46,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -63,13 +75,13 @@
 <p><b>tapestry-upload</b> is not automatically included in Tapestry applications because of the additional dependencies it requires. To include it, just add the <tt>tapestry-upload</tt> dependency to the pom of your application, something like this:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-<span class="code-tag">&lt;dependency&gt;</span>
-    <span class="code-tag">&lt;groupId&gt;</span>org.apache.tapestry<span class="code-tag">&lt;/groupId&gt;</span>
-    <span class="code-tag">&lt;artifactId&gt;</span>tapestry-upload<span class="code-tag">&lt;/artifactId&gt;</span>
-    <span class="code-tag">&lt;version&gt;</span>${tapestry-release-version}<span class="code-tag">&lt;/version&gt;</span>
-<span class="code-tag">&lt;/dependency&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;dependency&gt;
+    &lt;groupId&gt;org.apache.tapestry&lt;/groupId&gt;
+    &lt;artifactId&gt;tapestry-upload&lt;/artifactId&gt;
+    &lt;version&gt;${tapestry-release-version}&lt;/version&gt;
+&lt;/dependency&gt;
+]]></script>
 </div></div>
 
 <p>If you aren't using Maven, you'll have to download the jar and its dependencies yourself.</p>
@@ -81,13 +93,13 @@
 <h2><a shape="rect" name="UploadingFiles-ComponentTemplate"></a>Component Template</h2>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
     &lt;t:form&gt;
         &lt;t:errors/&gt;
-        &lt;input t:type=<span class="code-quote">"upload"</span> t:id=<span class="code-quote">"file"</span> t:value=<span class="code-quote">"file"</span> validate=<span class="code-quote">"required"</span>/&gt;
+        &lt;input t:type="upload" t:id="file" t:value="file" validate="required"/&gt;
         &lt;br/&gt;
-        &lt;input type=<span class="code-quote">"submit"</span> value=<span class="code-quote">"Upload"</span>/&gt;
-    &lt;/t:form&gt;</pre>
+        &lt;input type="submit" value="Upload"/&gt;
+    &lt;/t:form&gt;]]></script>
 </div></div>
 
 <p>Here, because the value parameter was not bound, the component used the file property of its container (because the component's id is 'file'). If you want to upload as a different property, either bind the value parameter or change the component's id.</p>
@@ -95,19 +107,19 @@
 <h2><a shape="rect" name="UploadingFiles-Pageclass"></a>Page class</h2>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-    <span class="code-keyword">public</span> class UploadExample
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+    public class UploadExample
     {
         @Property
-        <span class="code-keyword">private</span> UploadedFile file;
+        private UploadedFile file;
 
-        <span class="code-keyword">public</span> void onSuccess()
+        public void onSuccess()
         {
-            File copied = <span class="code-keyword">new</span> File(<span class="code-quote">"/my/file/location/"</span> + file.getFileName());
+            File copied = new File("/my/file/location/" + file.getFileName());
             
             file.write(copied);
         }
-    }</pre>
+    }]]></script>
 </div></div>
 
 <h1><a shape="rect" name="UploadingFiles-UploadExceptions"></a>Upload Exceptions</h1>
@@ -119,19 +131,19 @@
 <p>The event handler should return a non-null object, which will be handled as a navigational result. Example:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 
    @Persist(PersistenceConstants.FLASH)
     @Property
-    <span class="code-keyword">private</span> <span class="code-object">String</span> message;
+    private String message;
 
 
-    <span class="code-object">Object</span> onUploadException(FileUploadException ex)
+    Object onUploadException(FileUploadException ex)
     {
-        message = <span class="code-quote">"Upload exception: "</span> + ex.getMessage();
+        message = "Upload exception: " + ex.getMessage();
 
-        <span class="code-keyword">return</span> <span class="code-keyword">this</span>;
-    }</pre>
+        return this;
+    }]]></script>
 </div></div>
 
 <p>Note the importance of <tt>return this;</tt>. A void event handler method, or one that returns null, will result in the FileUploadException being reported to the user as an uncaught runtime exception.</p>
@@ -157,7 +169,7 @@
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -168,7 +180,7 @@
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/uploading-files.html" async="true">

Modified: websites/production/tapestry/content/url-rewriting.html
==============================================================================
--- websites/production/tapestry/content/url-rewriting.html (original)
+++ websites/production/tapestry/content/url-rewriting.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,18 @@
     URL rewriting -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/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"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +45,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -58,7 +69,7 @@
 <div id="content">
 <div id="ConfluenceContent"><h1><a shape="rect" name="URLrewriting-TapestryURLRewritingSupport"></a>Tapestry URL Rewriting Support</h1>
 
-<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Starting with Tapestry 5.2, the URLRewriterRule service has been replaced with the new LinkTransformer service.  This page needs to be revised to reflect the new API.  Meanwhile, please see Igor Drobiazko's <a shape="rect" class="external-link" href="http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/" >excellent blog post on this topic</a>.</td></tr></table></div>
+<div class="panelMacro"><table class="noteMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Starting with Tapestry 5.2, the URLRewriterRule service has been replaced with the new LinkTransformer service.  This page needs to be revised to reflect the new API.  Meanwhile, please see Igor Drobiazko's <a shape="rect" class="external-link" href="http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/" >excellent blog post on this topic</a>.</td></tr></table></div>
 
 <p>Since 5.1.0.1, Tapestry has basic support for URL rewriting. Incoming requests and links generated by Tapestry can be rewritten using exactly the same API, based on a chain of <a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/urlrewriter/URLRewriterRule.html">URLRewriterRule</a> interfaces. These rules are executed before all other Tapestry request handling, so your application does not otherwise know that the received request is not the original one.</p>
 
@@ -75,35 +86,35 @@
 <p>This example just rewrites all incoming requests to <tt>/struts</tt> to <tt>/tapestry</tt>. In your <tt>AppModule</tt> or any other Tapestry-IoC module class:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> <span class="code-keyword">static</span> void contributeURLRewriter(OrderedConfiguration&lt;URLRewriterRule&gt; configuration)
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public static void contributeURLRewriter(OrderedConfiguration&lt;URLRewriterRule&gt; configuration)
 {
     
-    URLRewriterRule rule = <span class="code-keyword">new</span> URLRewriterRule() 
+    URLRewriterRule rule = new URLRewriterRule() 
     {
 
-        <span class="code-keyword">public</span> Request process(Request request, URLRewriteContext context)
+        public Request process(Request request, URLRewriteContext context)
         {
-            <span class="code-keyword">final</span> <span class="code-object">String</span> path = request.getPath();
-            <span class="code-keyword">if</span> (path.equals(<span class="code-quote">"/struts"</span>))
+            final String path = request.getPath();
+            if (path.equals("/struts"))
             {
-                request = <span class="code-keyword">new</span> SimpleRequestWrapper(request, <span class="code-quote">"/tapestry"</span>);
+                request = new SimpleRequestWrapper(request, "/tapestry");
             }
             
-            <span class="code-keyword">return</span> request;
+            return request;
             
         }
 
-        <span class="code-keyword">public</span> RewriteRuleApplicability applicability()
+        public RewriteRuleApplicability applicability()
         {
-            <span class="code-keyword">return</span> RewriteRuleApplicability.INBOUND;
+            return RewriteRuleApplicability.INBOUND;
         }
         
     };
     
-    configuration.add(<span class="code-quote">"myrule"</span>, rule);
+    configuration.add("myrule", rule);
 }
-</pre>
+]]></script>
 </div></div>
 
 <h2><a shape="rect" name="URLrewriting-Exampleofrulechaining"></a>Example of rule chaining</h2>
@@ -111,106 +122,106 @@
 <p>In your <tt>AppModule</tt> or any other Tapestry-IoC module class.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> <span class="code-keyword">static</span> void contributeURLRewriter(OrderedConfiguration&lt;URLRewriterRule&gt; configuration)
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public static void contributeURLRewriter(OrderedConfiguration&lt;URLRewriterRule&gt; configuration)
 {
     
-    URLRewriterRule rule1 = <span class="code-keyword">new</span> URLRewriterRule()
+    URLRewriterRule rule1 = new URLRewriterRule()
     {
 
-        <span class="code-keyword">public</span> Request process(Request request, URLRewriteContext context)
+        public Request process(Request request, URLRewriteContext context)
         {
-            <span class="code-keyword">final</span> <span class="code-object">String</span> path = request.getPath();
-            <span class="code-keyword">if</span> (path.equals(<span class="code-quote">"/struts"</span>)) 
+            final String path = request.getPath();
+            if (path.equals("/struts")) 
             {
-                request = <span class="code-keyword">new</span> SimpleRequestWrapper(request, <span class="code-quote">"/jsf"</span>);
+                request = new SimpleRequestWrapper(request, "/jsf");
             }
             
-            <span class="code-keyword">return</span> request;
+            return request;
             
         }
 
-        <span class="code-keyword">public</span> RewriteRuleApplicability applicability()
+        public RewriteRuleApplicability applicability()
         {
-            <span class="code-keyword">return</span> RewriteRuleApplicability.INBOUND;
+            return RewriteRuleApplicability.INBOUND;
         } 
         
     };
     
-    URLRewriterRule rule2 = <span class="code-keyword">new</span> URLRewriterRule()
+    URLRewriterRule rule2 = new URLRewriterRule()
     {
 
-        <span class="code-keyword">public</span> Request process(Request request, URLRewriteContext context)
+        public Request process(Request request, URLRewriteContext context)
         {
-            <span class="code-keyword">final</span> <span class="code-object">String</span> path = request.getPath();
-            <span class="code-keyword">if</span> (path.equals(<span class="code-quote">"/jsf"</span>)) 
+            final String path = request.getPath();
+            if (path.equals("/jsf")) 
             {
-                request = <span class="code-keyword">new</span> SimpleRequestWrapper(request, <span class="code-quote">"/tapestry"</span>);
+                request = new SimpleRequestWrapper(request, "/tapestry");
             }
-            <span class="code-keyword">return</span> request;
+            return request;
             
         }
         
-        <span class="code-keyword">public</span> RewriteRuleApplicability applicability()
+        public RewriteRuleApplicability applicability()
         {
-            <span class="code-keyword">return</span> RewriteRuleApplicability.INBOUND;
+            return RewriteRuleApplicability.INBOUND;
         }
 
     };
     
-    URLRewriterRule rule3 = <span class="code-keyword">new</span> URLRewriterRule()
+    URLRewriterRule rule3 = new URLRewriterRule()
     {
 
-        <span class="code-keyword">public</span> Request process(Request request, URLRewriteContext context)
+        public Request process(Request request, URLRewriteContext context)
         {
-            <span class="code-object">String</span> path = request.getPath();
-            <span class="code-keyword">if</span> (path.equals(<span class="code-quote">"/tapestry"</span>)) 
+            String path = request.getPath();
+            if (path.equals("/tapestry")) 
             {
-                path = <span class="code-quote">"/urlrewritesuccess"</span>;
-                request = <span class="code-keyword">new</span> SimpleRequestWrapper(request, path);
+                path = "/urlrewritesuccess";
+                request = new SimpleRequestWrapper(request, path);
             }
-            <span class="code-keyword">return</span> request;
+            return request;
             
         }
         
-        <span class="code-keyword">public</span> RewriteRuleApplicability applicability()
+        public RewriteRuleApplicability applicability()
         {
-            <span class="code-keyword">return</span> RewriteRuleApplicability.INBOUND;
+            return RewriteRuleApplicability.INBOUND;
         }
 
     };
     
-    URLRewriterRule rule4 = <span class="code-keyword">new</span> URLRewriterRule()
+    URLRewriterRule rule4 = new URLRewriterRule()
     {
 
-        <span class="code-keyword">public</span> Request process(Request request, URLRewriteContext context)
+        public Request process(Request request, URLRewriteContext context)
         {
-            <span class="code-object">String</span> serverName = request.getServerName();
-            <span class="code-object">String</span> path = request.getPath();
-            <span class="code-keyword">final</span> <span class="code-object">String</span> pathToRewrite = <span class="code-quote">"/urlrewritesuccess/login"</span>;
-            <span class="code-keyword">if</span> (serverName.equals(<span class="code-quote">"localhost"</span>) &amp;&amp; path.equalsIgnoreCase(pathToRewrite)) 
+            String serverName = request.getServerName();
+            String path = request.getPath();
+            final String pathToRewrite = "/urlrewritesuccess/login";
+            if (serverName.equals("localhost") &amp;&amp; path.equalsIgnoreCase(pathToRewrite)) 
             {
-                request = <span class="code-keyword">new</span> SimpleRequestWrapper(request, <span class="code-quote">"http:<span class="code-comment">//login.domain.com"</span>, <span class="code-quote">"/"</span>);
-</span>            }
-            <span class="code-keyword">return</span> request;
+                request = new SimpleRequestWrapper(request, "http://login.domain.com", "/");
+            }
+            return request;
             
         }
 
-        <span class="code-keyword">public</span> RewriteRuleApplicability applicability()
+        public RewriteRuleApplicability applicability()
         {
-            <span class="code-keyword">return</span> RewriteRuleApplicability.OUTBOUND;
+            return RewriteRuleApplicability.OUTBOUND;
         }
 
 
     };    
     
-    configuration.add(<span class="code-quote">"rule1"</span>, rule1);
-    configuration.add(<span class="code-quote">"rule2"</span>, rule2, <span class="code-quote">"after:rule1"</span>);
-    configuration.add(<span class="code-quote">"rule3"</span>, rule3, <span class="code-quote">"after:rule2"</span>);
-    configuration.add(<span class="code-quote">"rule4"</span>, rule4);
+    configuration.add("rule1", rule1);
+    configuration.add("rule2", rule2, "after:rule1");
+    configuration.add("rule3", rule3, "after:rule2");
+    configuration.add("rule4", rule4);
     
 }
-</pre>
+]]></script>
 </div></div>
 
 <p>This examples shows the URL rewriting chaining: the first rule rewrites requests to <tt>/struts</tt> and rewrites them to <tt>/jsf</tt> and leaves requests to other URLs unchanged. The second rewrites <tt>/jsf</tt> to <tt>/tapestry</tt> and the third rewrites <tt>/tapestry</tt> to <tt>/urlrewritesuccess</tt>.</p>
@@ -222,47 +233,47 @@
 <p>The URLRewriteContext (added in 5.1.0.4) provides additional information for rewriting, particularly in the context of rewriting generated link urls. In the following example, we'll reconfigure the url used to render pages. Whereas the previous examples used separate rules for handling inbound and outbound rewriting, this demonstration will utilize a single rule for both scenarios. To simplify the example, we will assume that every page is named "XXXPage" (UserPage, TransactionPage, IndexPage, etc.). This naming convention also means that we don't have to worry about tapestry's auto-stripping of "index" from URLs, because our page would be IndexPage, rather than Index.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">public</span> <span class="code-keyword">static</span> void contributeURLRewriter(OrderedConfiguration&lt;URLRewriterRule&gt; configuration)
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+public static void contributeURLRewriter(OrderedConfiguration&lt;URLRewriterRule&gt; configuration)
 {
-    URLRewriterRule rule = <span class="code-keyword">new</span> URLRewriterRule() 
+    URLRewriterRule rule = new URLRewriterRule() 
     {
-        <span class="code-keyword">public</span> Request process(Request request, URLRewriteContext context)
+        public Request process(Request request, URLRewriteContext context)
         {
-            <span class="code-keyword">if</span> (context.isIncoming())
+            if (context.isIncoming())
             {
-                <span class="code-comment">//these look like component event requests, which we didn't rewrite, so ignore.
-</span>                <span class="code-keyword">if</span> (request.getPath().contains(<span class="code-quote">"."</span>) || request.getPath().contains(<span class="code-quote">":"</span>)) 
+                //these look like component event requests, which we didn't rewrite, so ignore.
+                if (request.getPath().contains(".") || request.getPath().contains(":")) 
                 {
-                    <span class="code-keyword">return</span> request;
+                    return request;
                 }
-                <span class="code-object">String</span> pageName = request.getPath().substring(1,request.getPath().indexOf('/',1));
-                <span class="code-keyword">return</span> <span class="code-keyword">new</span> SimpleRequestWrapper(request, request.getPath().replaceAll(pageName,pageName + <span class="code-quote">"page"</span>));
+                String pageName = request.getPath().substring(1,request.getPath().indexOf('/',1));
+                return new SimpleRequestWrapper(request, request.getPath().replaceAll(pageName,pageName + "page"));
             }
-            <span class="code-keyword">else</span>
+            else
             {
-               <span class="code-comment">//<span class="code-keyword">if</span> <span class="code-keyword">this</span> is a component event, getPageParameters() will <span class="code-keyword">return</span> <span class="code-keyword">null</span>.
-</span>               <span class="code-keyword">if</span> (context.getPageParameters() != <span class="code-keyword">null</span>) 
+               //if this is a component event, getPageParameters() will return null.
+               if (context.getPageParameters() != null) 
                {
-                    <span class="code-object">String</span> path = request.getPath();
-                    <span class="code-object">String</span> pageName = context.getPageParameters().getLogicalPageName().toLowerCase();
-                    <span class="code-object">String</span> newPageName = pageName.replaceAll(<span class="code-quote">"page$"</span>,"");
-                    <span class="code-keyword">return</span> <span class="code-keyword">new</span> SimpleRequestWrapper(request,path.replaceAll(pageName,newPageName));
+                    String path = request.getPath();
+                    String pageName = context.getPageParameters().getLogicalPageName().toLowerCase();
+                    String newPageName = pageName.replaceAll("page$","");
+                    return new SimpleRequestWrapper(request,path.replaceAll(pageName,newPageName));
                }
             }
-            <span class="code-keyword">return</span> request;
+            return request;
         }
 
-        <span class="code-keyword">public</span> RewriteRuleApplicability applicability()
+        public RewriteRuleApplicability applicability()
         {
-            <span class="code-keyword">return</span> RewriteRuleApplicability.BOTH;
+            return RewriteRuleApplicability.BOTH;
         }
     };
 
-    configuration.add(<span class="code-quote">"rule1"</span>,rule);
+    configuration.add("rule1",rule);
 
 }
-</pre>
+]]></script>
 </div></div>
 
 <p>In the first part of <tt>process</tt>, <tt>context.isIncoming()</tt> determines if the call to <tt>process</tt> occurred due to an inbound request. If so, the rule reverses the mapping done in the second portion of the method, so tapestry sees the original request.</p>
@@ -275,7 +286,7 @@
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -286,7 +297,7 @@
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/url-rewriting.html" async="true">

Modified: websites/production/tapestry/content/user-guide.html
==============================================================================
--- websites/production/tapestry/content/user-guide.html (original)
+++ websites/production/tapestry/content/user-guide.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,10 @@
     User Guide -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +37,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -185,7 +188,7 @@
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -196,7 +199,7 @@
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/user-guide.html" async="true">

Modified: websites/production/tapestry/content/userguide.html
==============================================================================
--- websites/production/tapestry/content/userguide.html (original)
+++ websites/production/tapestry/content/userguide.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,10 @@
     Userguide -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+
   <link href="/styles/style.css" rel="stylesheet" type="text/css"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +37,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -61,7 +64,7 @@
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -72,7 +75,7 @@
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/userguide.html" async="true">

Modified: websites/production/tapestry/content/using-beaneditform-to-create-user-forms.html
==============================================================================
--- websites/production/tapestry/content/using-beaneditform-to-create-user-forms.html (original)
+++ websites/production/tapestry/content/using-beaneditform-to-create-user-forms.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,19 @@
     Using BeanEditForm To Create User Forms -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shBrushXml.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"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +46,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -64,7 +76,7 @@ table.ScrollbarTable td.ScrollbarParent 
 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="implementing-the-hi-lo-guessing-game.html"><img align="middle" border="0" src="/images/confluence/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="implementing-the-hi-lo-guessing-game.html">Implementing the Hi-Lo Guessing Game</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="tapestry-tutorial.html"><img align="middle" border="0" src="/images/confluence/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="tapestry-tutorial.html">Tapestry Tutorial</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="using-tapestry-with-hibernate.html">Using Tapestry With Hibernate</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" hr
 ef="using-tapestry-with-hibernate.html"><img align="middle" border="0" src="/images/confluence/forwd_16.gif" width="16" height="16"></a></td></tr></table></div>
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="implementing-the-hi-lo-guessing-game.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="implementing-the-hi-lo-guessing-game.html">Implementing the Hi-Lo Guessing Game</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="tapestry-tutorial.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="tapestry-tutorial.html">Tapestry Tutorial</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="using-tapestry-with-hibernate.html">Using Tapestry With Hibernate</a></td><td colspan=
 "1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="using-tapestry-with-hibernate.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>
 
 <p>In the previous chapters, we saw how Tapestry can handle simple links, even links that pass information in the URL. In this chapter, we'll see how Tapestry can do the same, and quite a bit more, for HTML forms.</p>
 
@@ -75,47 +87,47 @@ table.ScrollbarTable td.ScrollbarNextIco
 <p>Tapestry treats public fields as if they were JavaBeans properties; since the Address object is just "dumb data", there's no need to get carried away writing getters and setters. Instead, we'll define an entity that is all public fields:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>src/main/java/com/example/tutorial/entities/Address.java</b></div><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">package</span> com.example.tutorial.entities;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+package com.example.tutorial.entities;
 
-<span class="code-keyword">import</span> com.example.tutorial.data.Honorific;
+import com.example.tutorial.data.Honorific;
 
-<span class="code-keyword">public</span> class Address
+public class Address
 {
-  <span class="code-keyword">public</span> Honorific honorific;
+  public Honorific honorific;
 
-  <span class="code-keyword">public</span> <span class="code-object">String</span> firstName;
+  public String firstName;
 
-  <span class="code-keyword">public</span> <span class="code-object">String</span> lastName;
+  public String lastName;
 
-  <span class="code-keyword">public</span> <span class="code-object">String</span> street1;
+  public String street1;
 
-  <span class="code-keyword">public</span> <span class="code-object">String</span> street2;
+  public String street2;
 
-  <span class="code-keyword">public</span> <span class="code-object">String</span> city;
+  public String city;
 
-  <span class="code-keyword">public</span> <span class="code-object">String</span> state;
+  public String state;
 
-  <span class="code-keyword">public</span> <span class="code-object">String</span> zip;
+  public String zip;
 
-  <span class="code-keyword">public</span> <span class="code-object">String</span> email;
+  public String email;
 
-  <span class="code-keyword">public</span> <span class="code-object">String</span> phone;
+  public String phone;
 }
-</pre>
+]]></script>
 </div></div>
 
 <p>We also need to define the enum type, Honorific:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>src/main/java/com/example/tutorial/data/Honorific.java</b></div><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">package</span> com.example.tutorial.data;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+package com.example.tutorial.data;
 
-<span class="code-keyword">public</span> <span class="code-keyword">enum</span> Honorific
+public enum Honorific
 {
   MR, MRS, MISS, DR
 }
-</pre>
+]]></script>
 </div></div>
 
 <h1><a shape="rect" name="UsingBeanEditFormToCreateUserForms-AddressPages"></a>Address Pages</h1>
@@ -125,13 +137,13 @@ table.ScrollbarTable td.ScrollbarNextIco
 <p>First, we'll update the Index.tml template, to create a link to the new page:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>src/main/resources/com/example/tutorial/pages/Index.tml (partial)</b></div><div class="codeContent panelContent">
-<pre class="code-xml">
-    <span class="code-tag">&lt;h1&gt;</span>Address Book<span class="code-tag">&lt;/h1&gt;</span>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+    &lt;h1&gt;Address Book&lt;/h1&gt;
 
-    <span class="code-tag">&lt;ul&gt;</span>
-      <span class="code-tag">&lt;li&gt;</span><span class="code-tag">&lt;t:pagelink page=<span class="code-quote">"address/create"</span>&gt;</span>Create new address<span class="code-tag">&lt;/t:pagelink&gt;</span><span class="code-tag">&lt;/li&gt;</span>
-    <span class="code-tag">&lt;/ul&gt;</span>
-</pre>
+    &lt;ul&gt;
+      &lt;li&gt;&lt;t:pagelink page="address/create"&gt;Create new address&lt;/t:pagelink&gt;&lt;/li&gt;
+    &lt;/ul&gt;
+]]></script>
 </div></div>
 
 
@@ -139,27 +151,27 @@ table.ScrollbarTable td.ScrollbarNextIco
 <p>Now we need the address/Create page; lets start with an empty shell, just to test our navigation.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>src/main/resources/com/example/tutorial/pages/address/CreateAddress.tml</b></div><div class="codeContent panelContent">
-<pre class="code-xml">
-&lt;html t:type=<span class="code-quote">"layout"</span> title=<span class="code-quote">"Create New Address"</span>
-  <span class="code-keyword">xmlns:t</span>=<span class="code-quote">"http://tapestry.apache.org/schema/tapestry_5_3.xsd"</span>&gt;
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;html t:type="layout" title="Create New Address"
+  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"&gt;
 
-  <span class="code-tag">&lt;em&gt;</span>coming soon ...<span class="code-tag">&lt;/em&gt;</span>
+  &lt;em&gt;coming soon ...&lt;/em&gt;
 
-<span class="code-tag">&lt;/html&gt;</span>
-</pre>
+&lt;/html&gt;
+]]></script>
 </div></div>
 
 <p>And the corresponding class:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>src/main/java/com/example/tutorial/pages/address/CreateAddress.java</b></div><div class="codeContent panelContent">
-<pre class="code-java">
-<span class="code-keyword">package</span> com.example.tutorial.pages.address;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+package com.example.tutorial.pages.address;
 
-<span class="code-keyword">public</span> class CreateAddress
+public class CreateAddress
 {
 
 }
-</pre>
+]]></script>
 </div></div>
 
 <p>So ... why is the class named "CreateAddress" and not simply "Create"? Actually, we could have named it "Create", and the application would still work, but the longer <em>class</em> name is equally valid. Tapestry noticed the redundancy in the class name (com.example.tutorial.pages.<tt><em>address</em></tt>.Create<em>Address</em>) and just stripped out the redundant suffix<style type="text/css">
@@ -242,7 +254,7 @@ var footnoteMarkerHighlight = function(i
 
 <p>And remember, regardless of the name that Tapestry assigns to your page, the template file is named like the Java class itself: CreateAddress.tml.</p>
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Index pages work in folders as well. A class named com.example.tutorial.pages.address.AddressIndex would be given the name "address/Index". However, Tapestry has special rules for pages named "Index" and the rendered URL would be <a shape="rect" class="external-link" href="http://localhost:8080/tutorial1/address/" >http://localhost:8080/tutorial1/address/</a>. In other words, you can place Index pages in any folder and Tapestry will build a short URL for that page ... and you <em>don't</em> have to keep naming the classes Index (it's confusing to have many classes with the same name, even across multiple packages); instead, you can name each index page after the package that contains it. Ta
 pestry users a smart <em>convention</em> to keep it all straight and generate short, to the point URLs.</td></tr></table></div>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">Index pages work in folders as well. A class named com.example.tutorial.pages.address.AddressIndex would be given the name "address/Index". However, Tapestry has special rules for pages named "Index" and the rendered URL would be <a shape="rect" class="external-link" href="http://localhost:8080/tutorial1/address/" >http://localhost:8080/tutorial1/address/</a>. In other words, you can place Index pages in any folder and Tapestry will build a short URL for that page ... and you <em>don't</em> have to keep naming the classes Index (it's confusing to have many classes with the same name, even across multiple packages); instead, you can name each index pag
 e after the package that contains it. Tapestry users a smart <em>convention</em> to keep it all straight and generate short, to the point URLs.</td></tr></table></div>
 
 <h1><a shape="rect" name="UsingBeanEditFormToCreateUserForms-UsingtheBeanEditFormComponent"></a>Using the BeanEditForm Component</h1>
 
@@ -251,18 +263,18 @@ var footnoteMarkerHighlight = function(i
 <p>Add the following to the CreateAddress template (replacing the "coming soon ..." message):</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>CreateAddress.tml (partial)</b></div><div class="codeContent panelContent">
-<pre class="code-xml">
-  <span class="code-tag">&lt;t:beaneditform object=<span class="code-quote">"address"</span>/&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+  &lt;t:beaneditform object="address"/&gt;
+]]></script>
 </div></div>
 
 <p>And match that up with a property in the CreateAddress class:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>CreateAddress.java (partial)</b></div><div class="codeContent panelContent">
-<pre class="code-java">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
   @Property
-  <span class="code-keyword">private</span> Address address;
-</pre>
+  private Address address;
+]]></script>
 </div></div>
 
 <p>When you refresh the page, you'll see the following:</p>
@@ -293,10 +305,10 @@ var footnoteMarkerHighlight = function(i
 <p>We can accomplish this by using the <tt>reorder</tt> parameter of the BeanEditForm component, which is a comma separated list of property (or public field) names:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader" style="border-bottom-width: 1px;"><b>CreateAddress.tml (partial)</b></div><div class="codeContent panelContent">
-<pre class="code-xml">
-  &lt;t:beaneditform object=<span class="code-quote">"address"</span>
-    reorder=<span class="code-quote">"honorific,firstName,lastName,street1,street2,city,state,zip,email,phone"</span> /&gt;
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+  &lt;t:beaneditform object="address"
+    reorder="honorific,firstName,lastName,street1,street2,city,state,zip,email,phone" /&gt;
+]]></script>
 </div></div>
 
 
@@ -339,9 +351,9 @@ DR=Dr.
 <p>That button is a component within the BeanEditForm component. It's not a property, so we can't just put a message into the message catalog, the way we can with the fields. Fortunately, the BeanEditForm component includes a parameter expressly for re-labeling the button. Simply change the CreateAddress component template:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-  <span class="code-tag">&lt;t:beaneditform submitlabel=<span class="code-quote">"Create Address"</span> object=<span class="code-quote">"address"</span>/&gt;</span>
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+  &lt;t:beaneditform submitlabel="Create Address" object="address"/&gt;
+]]></script>
 </div></div>
 
 <p>The default for the submitlabel parameter is "Create/Update", but here we're overriding that default to a specific value.</p>
@@ -361,10 +373,10 @@ Create Address form with proper labels</
 <p>Here we want to reference a message from the catalog, so we use the "message:" prefix:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-xml">
-  &lt;t:beaneditform object=<span class="code-quote">"address"</span> submitlabel=<span class="code-quote">"message:submit-label"</span>
-    reorder=<span class="code-quote">"honorific,firstName,lastName,street1,street2,city,state,zip,email,phone"</span> /&gt;
-</pre>
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+  &lt;t:beaneditform object="address" submitlabel="message:submit-label"
+    reorder="honorific,firstName,lastName,street1,street2,city,state,zip,email,phone" /&gt;
+]]></script>
 </div></div>
 
 <p>And then define the submit-label key in the message catalog:</p>
@@ -385,17 +397,17 @@ Create Address form with proper labels</
 <p>Edit the Address entity, and update the lastName, firstName, street1, city, state and zip fields, adding a @Validate annotation to each:</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-  @Validate(<span class="code-quote">"required"</span>)
-  <span class="code-keyword">public</span> <span class="code-object">String</span> firstName;
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+  @Validate("required")
+  public String firstName;
+]]></script>
 </div></div>
 
 <p>What is that string, "required"? That's how you specify the desired validation. It is a series of names that identify what type of validation is desired. A number of validators are built in, such as "required", "minLength" and "maxLength". As elsewhere, Tapestry is case insensitive.</p>
 
 <p>You can apply multiple validations, by separating the validator names with commas. Some validators can be configured (with an equals sign). Thus you might say "required,minLength=5" for a field that must be specified, and must be at least five characters long.</p>
 
-<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">You can easily get confused when you make a change to an entity class, such as adding the @Validate annotatation, and <em>not</em> see the result in the browser. Only component classes, and (most) classes in the Tapestry services layer, are live-reloaded.  Data and entity objects are not reloaded, so this is one area where you need to stop and restart Jetty to see the change.</td></tr></table></div>
+<div class="panelMacro"><table class="warningMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1">You can easily get confused when you make a change to an entity class, such as adding the @Validate annotatation, and <em>not</em> see the result in the browser. Only component classes, and (most) classes in the Tapestry services layer, are live-reloaded.  Data and entity objects are not reloaded, so this is one area where you need to stop and restart Jetty to see the change.</td></tr></table></div>
 
 <p>Restart the application, and refresh your browser, then hit the submit button.</p>
 
@@ -413,10 +425,10 @@ Create Address form with proper labels</
 <p>So ... how about some more interesting validation than just "required or not". Tapestry has built in support for validating based on field length and several variations of field value, including regular expressions. Zip codes are pretty easy to express as a regular expression.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-  @Validate(<span class="code-quote">"required,regexp=^\\d{5}(-\\d{4})?$"</span>)
-  <span class="code-keyword">public</span> <span class="code-object">String</span> zip;
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+  @Validate("required,regexp=^\\d{5}(-\\d{4})?$")
+  public String zip;
+]]></script>
 </div></div>
 
 <p>Let's give it a try; restart the application and enter an "abc" for the zip code.</p>
@@ -448,10 +460,10 @@ Regexp validation</p>
 <p>Let's go one step further. Turns out, we can move the regexp pattern to the message catalog as well. If you only provide the name of the validator in the @Validate annotation, Tapestry will search the containing page's message catalog of the constraint value, as well as the validation message. The constraint value for the regexp validator is the regular expression to match against.</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">
-  @Validate(<span class="code-quote">"required,regexp"</span>)
-  <span class="code-keyword">public</span> <span class="code-object">String</span> zip;
-</pre>
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
+  @Validate("required,regexp")
+  public String zip;
+]]></script>
 </div></div>
 
 <p>Now, just put the regular expression into the CreateAddress message catalog:</p>
@@ -492,12 +504,12 @@ table.ScrollbarTable td.ScrollbarParent 
 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="implementing-the-hi-lo-guessing-game.html"><img align="middle" border="0" src="/images/confluence/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="implementing-the-hi-lo-guessing-game.html">Implementing the Hi-Lo Guessing Game</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="tapestry-tutorial.html"><img align="middle" border="0" src="/images/confluence/up_16.gif" width="8" height="8"></a></sup><a shape="rect" href="tapestry-tutorial.html">Tapestry Tutorial</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="using-tapestry-with-hibernate.html">Using Tapestry With Hibernate</a></td><td colspan="1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" hr
 ef="using-tapestry-with-hibernate.html"><img align="middle" border="0" src="/images/confluence/forwd_16.gif" width="16" height="16"></a></td></tr></table></div></div>
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="implementing-the-hi-lo-guessing-game.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="implementing-the-hi-lo-guessing-game.html">Implementing the Hi-Lo Guessing Game</a>&#160;</td><td colspan="1" rowspan="1" class="ScrollbarParent" width="33%"><sup><a shape="rect" href="tapestry-tutorial.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="tapestry-tutorial.html">Tapestry Tutorial</a></td><td colspan="1" rowspan="1" class="ScrollbarNextName" width="33%">&#160;<a shape="rect" href="using-tapestry-with-hibernate.html">Using Tapestry With Hibernate</a></td><td colspan=
 "1" rowspan="1" class="ScrollbarNextIcon"><a shape="rect" href="using-tapestry-with-hibernate.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 class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -508,7 +520,7 @@ table.ScrollbarTable td.ScrollbarNextIco
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/using-beaneditform-to-create-user-forms.html" async="true">

Modified: websites/production/tapestry/content/using-beaneditform-to-create-user-forms.thumbs/create-address-initial.png
==============================================================================
Binary files - no diff available.

Modified: websites/production/tapestry/content/using-beaneditform-to-create-user-forms.thumbs/create-address-reordered.png
==============================================================================
Binary files - no diff available.

Modified: websites/production/tapestry/content/using-jsr-330-standard-annotations.html
==============================================================================
--- websites/production/tapestry/content/using-jsr-330-standard-annotations.html (original)
+++ websites/production/tapestry/content/using-jsr-330-standard-annotations.html Sun Sep 22 22:21:21 2013
@@ -24,7 +24,18 @@
     Using JSR 330 standard annotations -- Apache Tapestry
   </title>
   <link type="text/css" rel="stylesheet" href="/resources/space.css">
+
+    <link href='http://cxf.apache.org/resources/highlighter/styles/shCoreCXF.css' rel='stylesheet' type='text/css' />
+  <link href='http://cxf.apache.org/resources/highlighter/styles/shThemeCXF.css' rel='stylesheet' type='text/css' />
+  <script src='http://cxf.apache.org/resources/highlighter/scripts/shCore.js' type='text/javascript'></script>
+  <script src='http://cxf.apache.org/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"/>
+
 </head>
 <body>
   <div class="wrapper bs">
@@ -34,9 +45,9 @@
 </div>
 
 <div id="top">
-<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em">
+<div id="smallbanner"><div class="searchbox" style="float:right;margin: .3em 1em .1em 1em"><p>
 <span style="color: #999; font-size: 90%">Tapestry docs, issues, wikis &amp; blogs:</span>
-<form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
+</p><form enctype="application/x-www-form-urlencoded" method="get" action="http://tapestry.apache.org/search.html">
   <input type="text" name="q">
   <input type="submit" value="Search">
 </form>
@@ -64,27 +75,27 @@ table.ScrollbarTable td.ScrollbarParent 
 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="logging-in-tapestry.html"><img align="middle" border="0" src="/images/confluence/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="logging-in-tapestry.html">Logging in Tapestry</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="/images/confluence/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;</td></tr></table></div>
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="logging-in-tapestry.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="logging-in-tapestry.html">Logging in Tapestry</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;</td></tr></table></div>
 
 
 
-<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="/images/confluence/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Added in 5.3</b><br clear="none"></td></tr></table></div>
+<div class="panelMacro"><table class="infoMacro"><colgroup span="1"><col span="1" width="24"><col span="1"></colgroup><tr><td colspan="1" rowspan="1" valign="top"><img align="middle" src="https://cwiki.apache.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" alt="" border="0"></td><td colspan="1" rowspan="1"><b>Added in 5.3</b><br clear="none"></td></tr></table></div>
 <div style="border-right: 20px solid #D8E4F1;border-left: 20px solid #D8E4F1;"></div>
 <div class="navmenu" style="float:right; background:#eee; margin:3px; padding:3px"><table class="tableview" width="100%"><tr><th colspan="1" rowspan="1" style="padding: 3px 3px 3px 0px">Related Articles</th></tr><tr><td colspan="1" rowspan="1">
                                  <span class="icon icon-page" title="Page">Page:</span>
-                         <a shape="rect" href="ioc.html">IoC</a>
+                         <a shape="rect" href="tapestry-ioc-overview.html">Tapestry IoC Overview</a>
         
                                             </td></tr><tr><td colspan="1" rowspan="1">
                                  <span class="icon icon-page" title="Page">Page:</span>
-                         <a shape="rect" href="ioc-cookbook.html">IoC cookbook</a>
+                         <a shape="rect" href="tapestry-inversion-of-control-faq.html">Tapestry Inversion of Control FAQ</a>
         
                                             </td></tr><tr><td colspan="1" rowspan="1">
                                  <span class="icon icon-page" title="Page">Page:</span>
-                         <a shape="rect" href="tapestry-ioc-overview.html">Tapestry IoC Overview</a>
+                         <a shape="rect" href="ioc-cookbook.html">IoC cookbook</a>
         
                                             </td></tr><tr><td colspan="1" rowspan="1">
                                  <span class="icon icon-page" title="Page">Page:</span>
-                         <a shape="rect" href="tapestry-inversion-of-control-faq.html">Tapestry Inversion of Control FAQ</a>
+                         <a shape="rect" href="ioc.html">IoC</a>
         
                                             </td></tr></table>
 </div>
@@ -106,47 +117,47 @@ org.apache.tapestry5.ioc.annotations </t
 
 <p>Let&#8217;s start with field injection. In Tapestry the injection into fields is triggered by&#160;<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">@Inject</a>&#160;or&#160;<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectService.html">@InjectService</a>&#160;annotations. When @Inject annotation is present on a field, Tapestry tries to resolve the object to inject by the type of the field. If several implementations of the same service interface are available in the registry, you have to disambiguate which implementation you want to be injected. This can be done by placing the&#160;<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectService.html">@InjectService</a>&#160;annotation on the injection point.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">import</span> org.apache.tapestry5.ioc.annotations.Inject;
-<span class="code-keyword">import</span> org.apache.tapestry5.ioc.annotations.InjectService;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.ioc.annotations.InjectService;
 
 ...
 
-<span class="code-keyword">public</span> class AuthenticationFilter <span class="code-keyword">implements</span> ComponentRequestFilter {
+public class AuthenticationFilter implements ComponentRequestFilter {
 
-   @InjectService(<span class="code-quote">"HttpBasic"</span>)
-   <span class="code-keyword">private</span> AuthenticationService basicAuthService;
+   @InjectService("HttpBasic")
+   private AuthenticationService basicAuthService;
 
-   @InjectService(<span class="code-quote">"HttpDigest"</span>)
-   <span class="code-keyword">private</span> AuthenticationService digestAuthService;
+   @InjectService("HttpDigest")
+   private AuthenticationService digestAuthService;
 
    @Inject
-   <span class="code-keyword">private</span> Response response;
+   private Response response;
 
    ...
 
-}</pre>
+}]]></script>
 </div></div>
 <p>Now let&#8217;s see the JSR-330 equivalent of the same service. As you can see the @Inject annotations are interchangeable. The difference is how to get a service by its unique id. For this purpose JSR-330 provides the&#160;<a shape="rect" class="external-link" href="http://atinject.googlecode.com/svn/trunk/javadoc/javax/inject/Named.html" >@Named</a>&#160;annotation which accompanies the @Inject annotation.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">import</span> javax.inject.Inject;
-<span class="code-keyword">import</span> javax.inject.Named;
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[import javax.inject.Inject;
+import javax.inject.Named;
 
 ...
 
-<span class="code-keyword">public</span> class AuthenticationFilter <span class="code-keyword">implements</span> ComponentRequestFilter {
+public class AuthenticationFilter implements ComponentRequestFilter {
 
-   @Inject @Named(<span class="code-quote">"HttpBasic"</span>)
-   <span class="code-keyword">private</span> AuthenticationService basicAuthService;
+   @Inject @Named("HttpBasic")
+   private AuthenticationService basicAuthService;
 
-   @Inject @Named(<span class="code-quote">"HttpDigest"</span>)
-   <span class="code-keyword">private</span> AuthenticationService digestAuthService;
+   @Inject @Named("HttpDigest")
+   private AuthenticationService digestAuthService;
 
    @Inject
-   <span class="code-keyword">private</span> Response response;
+   private Response response;
 
    ...
 
-}</pre>
+}]]></script>
 </div></div>
 
 <h1><a shape="rect" name="UsingJSR330standardannotations-ConstructorInjection"></a>Constructor Injection</h1>
@@ -155,61 +166,61 @@ org.apache.tapestry5.ioc.annotations </t
 
 <p>However, the semantics of constructor injection are different in JSR-330 and Tapestry IoC. In JSR-330 a constructor is injectable only if the @Inject annotation is present.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class Car {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class Car {
 
-   <span class="code-keyword">public</span> Car() { ... }
+   public Car() { ... }
 
    @Inject
-   <span class="code-keyword">public</span> Car(Engine engine) { ... }
-}</pre>
+   public Car(Engine engine) { ... }
+}]]></script>
 </div></div>
 <p>In Tapestry the @Inject annotation for constructors is optional. All available constructors are candidates for injection: the constructor with the most parameters will be invoked.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class Car {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class Car {
 
-   <span class="code-keyword">public</span> Car() { ... }
+   public Car() { ... }
 
-   <span class="code-keyword">public</span> Car(Engine engine) { ... }
+   public Car(Engine engine) { ... }
 
-}</pre>
+}]]></script>
 </div></div>
 <p>When several constructors are available and you don&#8217;t want the constructor with most&#160; parameters to be injectable, you need to place the&#160;<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">@Inject</a>&#160;annotation.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class Car {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class Car {
 
-   <span class="code-keyword">public</span> Car() { ... }
+   public Car() { ... }
 
    @Inject
-   <span class="code-keyword">public</span> Car(Engine engine) { ... }
+   public Car(Engine engine) { ... }
 
-   <span class="code-keyword">public</span> Car(Engine engine, Logger logger) { ... }
+   public Car(Engine engine, Logger logger) { ... }
 
-}</pre>
+}]]></script>
 </div></div>
 
 <h1><a shape="rect" name="UsingJSR330standardannotations-InjectionIntoPagesandComponents"></a>Injection Into Pages and Components</h1>
 
 <p>Inside Tapestry components, injection occurs exclusively on fields. So far the injection was triggered by the&#160;<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/Inject.html">@Inject</a>&#160;or&#160;<a shape="rect" class="external-link" href="http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/annotations/InjectService.html">@InjectService</a>&#160;annotations. As of version 5.3 the injection points can also be marked with JSR-330 annotations. The following example demonstrates that.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class Index {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class Index {
 
    @Inject
-   <span class="code-keyword">private</span> Request request;
+   private Request request;
 
    @javax.inject.Inject
-   <span class="code-keyword">private</span> ComponentResources resources;
+   private ComponentResources resources;
 
    @javax.inject.Inject
-   @Named(<span class="code-quote">"FrenchGreeter"</span>)
-   <span class="code-keyword">private</span> Greeter greeter;
+   @Named("FrenchGreeter")
+   private Greeter greeter;
 
    @javax.inject.Inject
    @Symbol(SymbolConstants.PRODUCTION_MODE)
-   <span class="code-keyword">private</span> <span class="code-object">boolean</span> productionMode;
+   private boolean productionMode;
 
    void onActivate() { ... }
 
-}</pre>
+}]]></script>
 </div></div>
 
 
@@ -218,22 +229,22 @@ org.apache.tapestry5.ioc.annotations </t
 
 <p>Both JSR-330 and Tapestry IoC allow you to disambiguate services by marker or qualifier annotations, as shown in the following example.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class Index {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class Index {
 
    @Inject
    @French
-   <span class="code-keyword">private</span> Greeter greeter;
+   private Greeter greeter;
 
-}</pre>
+}]]></script>
 </div></div>
 <p>Again, there is a slight difference. In JSR-330 a qualifier annotation like&#160;<em>@French</em>&#160;in the example above needs to be annotated by the&#160;<a shape="rect" class="external-link" href="http://atinject.googlecode.com/svn/trunk/javadoc/javax/inject/Qualifier.html" >@Qualifier</a>&#160;annotation.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java">@Documented
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Documented
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)
 @javax.inject.Qualifier
-<span class="code-keyword">public</span> @<span class="code-keyword">interface</span> French {
-}</pre>
+public @interface French {
+}]]></script>
 </div></div>
 <p>In Tapestry any annotation can be a marker annotation. You don&#8217;t need to place something like the&#160;<a shape="rect" class="external-link" href="http://atinject.googlecode.com/svn/trunk/javadoc/javax/inject/Qualifier.html" >@Qualifier</a>&#160;annotation on your marker annotation.</p>
 
@@ -241,30 +252,30 @@ org.apache.tapestry5.ioc.annotations </t
 
 <p>Injectable methods is a next slight difference. In JSR-330 a method is injectable if the @Inject annotation is present. In Tapestry the @Inject annotation is optional. An ordinary setter method is a candidate to perform injection.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class Car {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class Car {
 
-   <span class="code-keyword">private</span> Engine engine;
+   private Engine engine;
 
-   <span class="code-keyword">public</span> void setEngine(Engine engine) {
-      <span class="code-keyword">this</span>.engine = engine;
+   public void setEngine(Engine engine) {
+      this.engine = engine;
    }
 
-}</pre>
+}]]></script>
 </div></div>
 <p>When building a&#160;<em>Car</em>&#160;instance, Tapestry IoC will try to resolve a service of type&#160;<em>Engine</em>. If available, Tapestry will perform injection by invoking the setter method.</p>
 
 <p>Besides that, module methods are injectable. Again, there is no need to mark the methods with @Inject annotation as Tapestry explicitly knows which module methods to invoke. In the following example you can see how to use&#160;<a shape="rect" class="external-link" href="http://atinject.googlecode.com/svn/trunk/javadoc/javax/inject/Named.html" >@Named</a>&#160;annotation to inject a service by id into a&#160;<em>contribute method</em>.</p>
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
-<pre class="code-java"><span class="code-keyword">public</span> class TapestryModule {
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[public class TapestryModule {
 
    @Contribute(BindingSource.class)
-   <span class="code-keyword">public</span> <span class="code-keyword">static</span> void provideBindings(
-         MappedConfiguration&lt;<span class="code-object">String</span>, BindingFactory&gt; cfg,
+   public static void provideBindings(
+         MappedConfiguration&lt;String, BindingFactory&gt; cfg,
 
-         @Named(<span class="code-quote">"PropBindingFactory"</span>)
+         @Named("PropBindingFactory")
          BindingFactory propBindingFactory,
 
-         @Named(<span class="code-quote">"MessageBindingFactory"</span>)
+         @Named("MessageBindingFactory")
          BindingFactory messageBindingFactor ) {
 
       cfg.add(BindingConstants.PROP,
@@ -275,7 +286,7 @@ org.apache.tapestry5.ioc.annotations </t
    }
 
    ...
-}</pre>
+}]]></script>
 </div></div>
 
 
@@ -294,12 +305,12 @@ table.ScrollbarTable td.ScrollbarParent 
 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="logging-in-tapestry.html"><img align="middle" border="0" src="/images/confluence/back_16.gif" width="16" height="16"></a></td><td colspan="1" rowspan="1" class="ScrollbarPrevName" width="33%"><a shape="rect" href="logging-in-tapestry.html">Logging in Tapestry</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="/images/confluence/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;</td></tr></table></div></div>
+/*]]>*/</style><div class="Scrollbar"><table class="ScrollbarTable"><tr><td colspan="1" rowspan="1" class="ScrollbarPrevIcon"><a shape="rect" href="logging-in-tapestry.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="logging-in-tapestry.html">Logging in Tapestry</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;</td></tr></table></div></div>
 </div>
 
 <div class="clearer"></div>
 <div id="footer">
-<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.</p>
+<div id="footer"><p>Apache Tapestry, Tapestry, Apache, the Apache feather logo, and the Apache Tapestry project logo are trademarks of The Apache Software Foundation.<br clear="none">
 <script type="text/javascript">
   var _gaq = _gaq || [];
   _gaq.push(['_setAccount', 'UA-400821-1']);
@@ -310,7 +321,7 @@ table.ScrollbarTable td.ScrollbarNextIco
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
   })();
-</script></div>
+</script></p></div>
 </div>
 		<div id="comments_thread"></div>
 		<script type="text/javascript" src="https://comments.apache.org/show_comments.lua?site=tapestry&amp;page=http://tapestry.apache.org/using-jsr-330-standard-annotations.html" async="true">