jvanzyl 00/10/09 08:11:11
Modified: testbed foreach-array.vm foreach-method.vm
foreach-variable.vm foreach-vector.vm formal.vm
method.vm sample.vm test.vm
Log:
- testbed updates.
Revision Changes Path
1.3 +2 -2 jakarta-velocity/testbed/foreach-array.vm
Index: foreach-array.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/testbed/foreach-array.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- foreach-array.vm 2000/10/03 17:01:50 1.2
+++ foreach-array.vm 2000/10/09 15:11:07 1.3
@@ -1,9 +1,9 @@
Foreach with an array.
<table>
-#foreach ($provider in $provider.Array)
+#foreach ($element in $provider.Array)
<tr>
- <td>This is $provider</td>
+ <td>This is $element</td>
</tr>
#end
</table>
1.3 +2 -2 jakarta-velocity/testbed/foreach-method.vm
Index: foreach-method.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/testbed/foreach-method.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- foreach-method.vm 2000/10/03 17:01:50 1.2
+++ foreach-method.vm 2000/10/09 15:11:07 1.3
@@ -1,5 +1,5 @@
Foreach with a method.
-#foreach ($provider in $provider.getCustomers())
- This is $provider.
+#foreach ($element in $provider.getCustomers())
+ This is $element.
#end
1.3 +2 -2 jakarta-velocity/testbed/foreach-variable.vm
Index: foreach-variable.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/testbed/foreach-variable.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- foreach-variable.vm 2000/10/03 17:01:51 1.2
+++ foreach-variable.vm 2000/10/09 15:11:07 1.3
@@ -1,5 +1,5 @@
Foreach with a variable.
-#foreach ($provider in $list)
- This is $provider.
+#foreach ($element in $list)
+ This is $element.
#end
1.3 +2 -2 jakarta-velocity/testbed/foreach-vector.vm
Index: foreach-vector.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/testbed/foreach-vector.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- foreach-vector.vm 2000/10/03 17:01:51 1.2
+++ foreach-vector.vm 2000/10/09 15:11:07 1.3
@@ -1,5 +1,5 @@
Foreach with a vector
-#foreach ($provider in $provider.Vector)
- This is the $provider.
+#foreach ($element in $provider.Vector)
+ This is the $element.
#end
1.2 +7 -0 jakarta-velocity/testbed/formal.vm
Index: formal.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/testbed/formal.vm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- formal.vm 2000/09/30 17:04:30 1.1
+++ formal.vm 2000/10/09 15:11:07 1.2
@@ -11,3 +11,10 @@
${provider.Title}MapBuilder
${provider.Title}.map.${provider.Title}MapBuilder
+
+#set $this = "this"
+#set $that = "that"
+
+${this}${that}
+
+${provider.getTitle()}
1.2 +1 -1 jakarta-velocity/testbed/method.vm
Index: method.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/testbed/method.vm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- method.vm 2000/09/30 17:04:30 1.1
+++ method.vm 2000/10/09 15:11:07 1.2
@@ -1,2 +1,2 @@
-$provider.concat(["I", "am", "a", $provider.Title])
+$provider.concat(["I", "am", "a", $provider.concat(["running", "man"])])
1.3 +1 -1 jakarta-velocity/testbed/sample.vm
Index: sample.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/testbed/sample.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sample.vm 2000/10/03 17:01:52 1.2
+++ sample.vm 2000/10/09 15:11:07 1.3
@@ -11,7 +11,7 @@
Names
</td>
</tr>
- #foreach ($name in $list)
+ #foreach ($name in $provider.Customers)
<tr>
<td bgcolor="#eeeeee">$name</td>
</tr>
1.3 +13 -15 jakarta-velocity/testbed/test.vm
Index: test.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/testbed/test.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- test.vm 2000/10/03 17:01:52 1.2
+++ test.vm 2000/10/09 15:11:07 1.3
@@ -7,6 +7,7 @@
$customer.Name
#end
+
## this is a comment.
#if ($customer)
@@ -24,8 +25,6 @@
This is the $foo way.
-
-
#if ($foo)
This is $bar.
#elseif ($bar)
@@ -43,7 +42,6 @@
#end
-
\#set \$foo = "bar"
\$foo => $foo
@@ -97,7 +95,6 @@
<!-- This is an HTML comment -->
-
$provider2.Title
#set $a = "x"
@@ -160,37 +157,38 @@
This expression is always (true).
#end
+
Foreach with a variable.
-#foreach ($provider in $list)
- This is $provider.
+#foreach ($element in $list)
+ This is $element.
#end
+
Foreach with an array.
<table>
-#foreach ($provider in $provider.Array)
+#foreach ($element in $provider.Array)
<tr>
- <td>This is $provider</td>
+ <td>This is $element</td>
</tr>
#end
</table>
-
-#foreach ($provider in $provider.Vector)
- This is the $provider.
+#foreach ($element in $provider.Vector)
+ This is the $element.
#end
-
Foreach with a method.
-#foreach ($provider in $provider.getCustomers())
- This is $provider.
+#foreach ($element in $provider.getCustomers())
+ This is $element.
#end
+#stop
$10.00
@@ -203,7 +201,7 @@
this = that
-I am a $provider.getTitle().
+I am a $provider.getTitle() .
#if ($provider.theAPLRules())
Yes the APL rules!