You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2007/01/08 19:29:01 UTC

svn commit: r494142 - /velocity/tools/trunk/examples/showcase/VM_global_library.vm

Author: nbubna
Date: Mon Jan  8 10:29:00 2007
New Revision: 494142

URL: http://svn.apache.org/viewvc?view=rev&rev=494142
Log:
use best practices for link tool and use proper method name in demo2 and demo3

Modified:
    velocity/tools/trunk/examples/showcase/VM_global_library.vm

Modified: velocity/tools/trunk/examples/showcase/VM_global_library.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/VM_global_library.vm?view=diff&rev=494142&r1=494141&r2=494142
==============================================================================
--- velocity/tools/trunk/examples/showcase/VM_global_library.vm (original)
+++ velocity/tools/trunk/examples/showcase/VM_global_library.vm Mon Jan  8 10:29:00 2007
@@ -89,7 +89,7 @@
   #set( $quote = $esc.q )
 #end
 <tr>
-  <form name="${method}" method="get" action="${link.self}$link.anchor($method)"> ## HttpUnit doesn't like anchor-only links
+  <form name="${method}" method="get" action="$link.self.anchor($method)"> ## HttpUnit doesn't like anchor-only links
   <td valign="top">
     <a name="$method"><nobr>
       ${esc.d}${toolname}.$method(${quote}<input type="text" size="$size" name="$method" value="$!params.get($method)">${quote})
@@ -127,7 +127,7 @@
 #set( $method1 = "${method}1" )
 #set( $method2 = "${method}2" )
 <tr>
-  <form name="${method}2" method="get" action="${link.self}$link.anchor($method2)"> ## HttpUnit doesn't like anchor-only links
+  <form name="$method2" method="get" action="$link.self.anchor($method2)"> ## HttpUnit doesn't like anchor-only links
   <td valign="top">
     <a name="$method2"><nobr>${esc.d}${toolname}.$method(${quote}<input type="text" size="$size" name="${method1}" value="$!params.get("${method1}")">${quote},
                                                         ${quote}<input type="text" size="$size" name="${method2}" value="$!params.get("${method2}")">${quote})</nobr></a>
@@ -136,7 +136,7 @@
     #if( $params.get(${method1}) )
       ${esc.d}${toolname}.${method}(${quote}$!params.get(${method1})${quote}, ${quote}$!params.get(${method2})${quote})
       =
-      <div id="${method}2">$render.eval("${esc.d}${toolname}.${method}(${quote}$!params.get(${method1})${quote}, ${quote}$!params.get(${method2})${quote})")</div>
+      <div id="$method2">$render.eval("${esc.d}${toolname}.${method}(${quote}$!params.get(${method1})${quote}, ${quote}$!params.get(${method2})${quote})")</div>
       <input type="submit" value="Try again!">
     #else
       <input type="submit" value="Try it!">
@@ -165,7 +165,7 @@
 #set( $method2 = "${method}B" )
 #set( $method3 = "${method}C" )
 <tr>
-  <form name="${method}3" method="get" action="${link.self}$link.anchor($method3)"> ## HttpUnit doesn't like anchor-only links
+  <form name="$method3" method="get" action="$link.self.anchor($method3)"> ## HttpUnit doesn't like anchor-only links
   <td valign="top">
     <a name="$method3"><nobr>${esc.d}${toolname}.$method(${quote}<input type="text" size="$size" name="${method1}" value="$!params.get("${method1}")">${quote},
                                                         ${quote}<input type="text" size="$size" name="${method2}" value="$!params.get("${method2}")">${quote},
@@ -175,7 +175,7 @@
     #if( $params.get(${method1}) )
       ${esc.d}${toolname}.${method}(${quote}$!params.get(${method1})${quote}, ${quote}$!params.get(${method2})${quote}, ${quote}$!params.get(${method3})${quote})
       =
-      <div id="${method}3">$render.eval("${esc.d}${toolname}.${method}(${quote}$!params.get(${method1})${quote}, ${quote}$!params.get(${method2})${quote}, ${quote}$!params.get(${method3})${quote})")</div>
+      <div id="$method3">$render.eval("${esc.d}${toolname}.${method}(${quote}$!params.get(${method1})${quote}, ${quote}$!params.get(${method2})${quote}, ${quote}$!params.get(${method3})${quote})")</div>
       <input type="submit" value="Try again!">
     #else
       <input type="submit" value="Try it!">