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 2009/03/05 14:45:11 UTC
svn commit: r750457 - in
/tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp: WEB-INF/tools.xml
velocity/putattributeslayout.vm velocity/testput.vm velocity/testput_el.vm
velocity/testput_flush.vm velocity/testput_servlet.vm velocity/testputlist.vm
Author: apetrelli
Date: Thu Mar 5 13:45:11 2009
New Revision: 750457
URL: http://svn.apache.org/viewvc?rev=750457&view=rev
Log:
TILESSB-8
Second bunch of tests fixed.
Modified:
tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/WEB-INF/tools.xml
tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/putattributeslayout.vm
tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput.vm
tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_el.vm
tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_flush.vm
tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_servlet.vm
tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testputlist.vm
Modified: tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/WEB-INF/tools.xml
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/WEB-INF/tools.xml?rev=750457&r1=750456&r2=750457&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/WEB-INF/tools.xml (original)
+++ tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/WEB-INF/tools.xml Thu Mar 5 13:45:11 2009
@@ -20,5 +20,9 @@
<tools>
<toolbox scope="request">
<tool key="exc" class="org.apache.tiles.test.velocity.ExceptionTool"/>
+ <tool class="org.apache.velocity.tools.generic.ContextTool"/>
</toolbox>
+ <toolbox scope="application">
+ <tool class="org.apache.velocity.tools.generic.EscapeTool"/>
+ </toolbox>
</tools>
Modified: tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/putattributeslayout.vm
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/putattributeslayout.vm?rev=750457&r1=750456&r2=750457&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/putattributeslayout.vm (original)
+++ tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/putattributeslayout.vm Thu Mar 5 13:45:11 2009
@@ -19,12 +19,12 @@
* under the License.
*
*#
-$tiles.importAttribute name="stringTest"/>
-$tiles.importAttribute name="list"/>
-Single attribute "stringTest" value: ${stringTest?html} <br/><br/>
+$tiles.importAttribute({"name":"stringTest"})
+$tiles.importAttribute({"name":"list"})
+Single attribute "stringTest" value: $esc.html($stringTest) <br/><br/>
The attribute "list" contains these values:
<ul>
-<#list list as item>
-<li>$tiles.insertAttribute value=item /></li>
-</#list>
+#foreach($item in $list))
+<li>$tiles.insertAttribute({"value":$item})></li>
+#end
</ul>
\ No newline at end of file
Modified: tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput.vm
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput.vm?rev=750457&r1=750456&r2=750457&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput.vm (original)
+++ tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput.vm Thu Mar 5 13:45:11 2009
@@ -19,8 +19,8 @@
* under the License.
*
*#
-$tiles.insertTemplate template="/velocity/layout.vm">
- $tiles.putAttribute name="title" value="This is the title." />
- $tiles.putAttribute name="header" value="/velocity/header.vm" />
- $tiles.putAttribute name="body" value="/velocity/body.vm" />
-</...@tiles.insertTemplate>
\ No newline at end of file
+$tiles.insertTemplate().start({"template":"/velocity/layout.vm"})
+ $tiles.putAttribute({"name":"title", "value":"This is the title."})
+ $tiles.putAttribute({"name":"header", "value":"/velocity/header.vm"})
+ $tiles.putAttribute({"name":"body", "value":"/velocity/body.vm"})
+$tiles.insertTemplate().end()
Modified: tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_el.vm
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_el.vm?rev=750457&r1=750456&r2=750457&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_el.vm (original)
+++ tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_el.vm Thu Mar 5 13:45:11 2009
@@ -19,10 +19,10 @@
* under the License.
*
*#
-<#assign bodyContent="Body Content defined by and el" />
+#set($bodyContent="Body Content defined by and el")
-$tiles.insertTemplate template="/velocity/layout.vm">
- $tiles.putAttribute name="title" value="This is the title." />
- $tiles.putAttribute name="header" value="/velocity/header.vm" />
- $tiles.putAttribute name="body" value=bodyContent />
-</...@tiles.insertTemplate>
\ No newline at end of file
+$tiles.insertTemplate().start({"template":"/velocity/layout.vm"})
+ $tiles.putAttribute({"name":"title", "value":"This is the title."})
+ $tiles.putAttribute({"name":"header", "value":"/velocity/header.vm"})
+ $tiles.putAttribute({"name":"body", "value":$bodyContent})
+$tiles.insertTemplate().end()
Modified: tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_flush.vm
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_flush.vm?rev=750457&r1=750456&r2=750457&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_flush.vm (original)
+++ tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_flush.vm Thu Mar 5 13:45:11 2009
@@ -19,8 +19,8 @@
* under the License.
*
*#
-$tiles.insertTemplate template="/velocity/layout.vm" flush="true">
- $tiles.putAttribute name="title" value="This is the title." />
- $tiles.putAttribute name="header" value="/velocity/header.vm" />
- $tiles.putAttribute name="body" value="/velocity/body.vm" />
-</...@tiles.insertTemplate>
\ No newline at end of file
+$tiles.insertTemplate().start({"template":"/velocity/layout.vm", "flush":true})
+ $tiles.putAttribute({"name":"title", "value":"This is the title."})
+ $tiles.putAttribute({"name":"header", "value":"/velocity/header.vm"})
+ $tiles.putAttribute({"name":"body", "value":"/velocity/body.vm"})
+$tiles.insertTemplate().end()
Modified: tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_servlet.vm
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_servlet.vm?rev=750457&r1=750456&r2=750457&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_servlet.vm (original)
+++ tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testput_servlet.vm Thu Mar 5 13:45:11 2009
@@ -19,8 +19,8 @@
* under the License.
*
*#
-$tiles.insertTemplate template="/servlets/layoutServlet">
- $tiles.putAttribute name="title" value="This is the title." />
- $tiles.putAttribute name="header" value="/velocity/header.vm" />
- $tiles.putAttribute name="body" value="/velocity/body.vm" />
-</...@tiles.insertTemplate>
\ No newline at end of file
+$tiles.insertTemplate().start({"template":"/servlets/layoutServlet"})
+ $tiles.putAttribute({"name":"title", "value":"This is the title."})
+ $tiles.putAttribute({"name":"header", "value":"/velocity/header.vm"})
+ $tiles.putAttribute({"name":"body", "value":"/velocity/body.vm"})
+$tiles.insertTemplate().end()
Modified: tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testputlist.vm
URL: http://svn.apache.org/viewvc/tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testputlist.vm?rev=750457&r1=750456&r2=750457&view=diff
==============================================================================
--- tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testputlist.vm (original)
+++ tiles/sandbox/trunk/tiles-test-sandbox/src/main/webapp/velocity/testputlist.vm Thu Mar 5 13:45:11 2009
@@ -19,11 +19,11 @@
* under the License.
*
*#
-$tiles.insertTemplate template="/velocity/putattributeslayout.vm">
- $tiles.putAttribute name="stringTest" value="This is a string" type="string" />
- $tiles.putListAttribute name="list">
- $tiles.addAttribute value="valueOne" type="string" />
- $tiles.addAttribute value="valueTwo" type="string" />
- $tiles.addAttribute value="valueThree" type="string" />
- </...@tiles.putListAttribute>
-</...@tiles.insertTemplate>
\ No newline at end of file
+$tiles.insertTemplate().start({"template":"/velocity/putattributeslayout.vm"})
+ $tiles.putAttribute({"name":"stringTest", "value":"This is a string", "type":"string"})
+ $tiles.putListAttribute().start({"name":"list"})
+ $tiles.addAttribute({"value":"valueOne", "type":"string"})
+ $tiles.addAttribute({"value":"valueTwo", "type":"string"})
+ $tiles.addAttribute({"value":"valueThree", "type":"string"})
+ $tiles.putListAttribute().end()
+$tiles.insertTemplate().end()