You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tiles.apache.org by ap...@apache.org on 2010/01/25 21:28:37 UTC

svn commit: r902966 - /tiles/framework/trunk/src/site/apt/tutorial/integration/velocity.apt

Author: apetrelli
Date: Mon Jan 25 20:28:36 2010
New Revision: 902966

URL: http://svn.apache.org/viewvc?rev=902966&view=rev
Log:
TILES-490
Fixed docs.

Modified:
    tiles/framework/trunk/src/site/apt/tutorial/integration/velocity.apt

Modified: tiles/framework/trunk/src/site/apt/tutorial/integration/velocity.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/integration/velocity.apt?rev=902966&r1=902965&r2=902966&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/integration/velocity.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/integration/velocity.apt Mon Jan 25 20:28:36 2010
@@ -35,6 +35,21 @@
 
   * Add <<<tiles-template-x.x.x.jar>>> and <<<tiles-velocity-x.x.x.jar>>> files
   to your application.
+  * Add this code in you <<<velocity.properties>>> file:
+
+----------------------------------
+userdirective=org.apache.tiles.velocity.template.AddAttributeDirective,\
+  org.apache.tiles.velocity.template.AddListAttributeDirective,\
+  org.apache.tiles.velocity.template.DefinitionDirective,\
+  org.apache.tiles.velocity.template.GetAsStringDirective,\
+  org.apache.tiles.velocity.template.ImportAttributeDirective,\
+  org.apache.tiles.velocity.template.InsertAttributeDirective,\
+  org.apache.tiles.velocity.template.InsertDefinitionDirective,\
+  org.apache.tiles.velocity.template.InsertTemplateDirective,\
+  org.apache.tiles.velocity.template.PutAttributeDirective,\
+  org.apache.tiles.velocity.template.PutListAttributeDirective
+----------------------------------
+
 
   * To access ".vm" files from HTTP requests, add this piece of configuration in <<<web.xml>>>
   (the parameters can be modified as needed).
@@ -87,9 +102,9 @@
 
 * Usage in Velocity templates
 
-  There are two Velocity tools that will be available to your application:
+  There are two ways to use Tiles-Velocity integration:
 
-  * the <<<tilesAlt>>> tool, that is a Velocity-style tool:
+  * the <<<tiles>>> tool, that is a Velocity-style tool:
 
 ----------------------------------
 $tilesAlt.startAttributeContext()
@@ -113,14 +128,14 @@
 $tilesAlt.endAttributeContext()
 ----------------------------------
 
-  * the <<<tiles>>> tool, that has both Velocity-style methods and directive oriented methods.
+  * the <<<tiles>>> directives, that have a tag-like meaning.
 
 ----------------------------------
-$tiles.insertTemplate.start({"template":"/page/myTemplate.vm"})
-  $tiles.putAttribute({"name":"title", "value":"This is the title."})
-  $tiles.putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})
-  $tiles.putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})
-$tiles.insertTemplate().end()
+#tiles_insertTemplate({"template":"/page/myTemplate.vm"})
+  #tiles_putAttribute({"name":"title", "value":"This is the title."})#end
+  #tiles_putAttribute({"name":"header", "value":"/velocity/header.vm", "type":"velocity"})#end
+  #tiles_putAttribute({"name":"body", "value":"/velocity/body.vm", "type":"velocity"})#end
+#end
 ----------------------------------
 
-  For details about directives see the {{{../../apidocs/index.html}Javadocs}}.
+  For details about the tool and directives see the {{{../../apidocs/index.html}Javadocs}}.