Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix doc

  • Loading branch information...
commit 94b31a786bebe88b0b288357ba44c177e20e1f8d 1 parent 49456f5
@choreo authored
Showing with 26 additions and 2 deletions.
  1. +11 −1 README.textile
  2. +15 −1 documentation/manual/home.textile
View
12 README.textile
@@ -2,4 +2,14 @@ h1. Thymeleaf module
h2. Description
-p. A Play framework module to use "Thymeleaf 2.0":http://www.thymeleaf.org/ as a template engine.
+p. A Play framework module to use "Thymeleaf 2.0":http://www.thymeleaf.org/ as a template engine.
+
+h2. Version History:
+
+* 2012/04/04 v1.1:
+# Updated dependency to thymeleaf 2.0.5
+# Added Error processor (pl:error)
+# Added optional template resolver class that loads template files from module
+# Added optional PlayMessageResolver
+
+* 2012/03/09 v1.0: First release.
View
16 documentation/manual/home.textile
@@ -99,13 +99,27 @@ The default method of the form is 'GET' contrary to Groovy template. You can ov
@</form>@
</code>
+h3. Error Processor
+
+"error" Attribute Processor acts like #{error /} tag in Groovy template. In the sample code below, the span tag appears only if there is an error.
+
+<code>
+@<input type="text" name="user.name" th:value="${user?user.name:null}" /><span class="error" pl:error="user.name">validation error comes here.</span>@
+</code>
+
h2. Extra implicit objects
* play.templates.JavaExtensions instance is availabe as 'ext': ${ext.nl2br('line\nNewline')}
h2. Message Resolution
-By default, thymeleaf's StandardMessageReolver is used. Add PlayMessageResolver to TemplateEngine that resloves messages with play.i18n.Messages.
+By default, thymeleaf's StandardMessageReolver is used. Add PlayMessageResolver to TemplateEngine so that the messages are resolved by play.i18n.Messages.
+
+<code>
+ Play.plugin(ThymeleafPlugin.class)
+ .getTemplateEngine()
+ .addMessageResolver(new PlayMessageResolver());
+</code>
h2. Notice
Please sign in to comment.
Something went wrong with that request. Please try again.