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/02/15 04:30:12 UTC

svn commit: r507799 - in /velocity/tools/trunk/examples/showcase: ./ WEB-INF/src/ layout/

Author: nbubna
Date: Wed Feb 14 19:30:10 2007
New Revision: 507799

URL: http://svn.apache.org/viewvc?view=rev&rev=507799
Log:
use ResourceTool to handle most common text

Modified:
    velocity/tools/trunk/examples/showcase/Error.vm
    velocity/tools/trunk/examples/showcase/VM_global_library.vm
    velocity/tools/trunk/examples/showcase/WEB-INF/src/resources.properties
    velocity/tools/trunk/examples/showcase/alternator.vm
    velocity/tools/trunk/examples/showcase/browser.vm
    velocity/tools/trunk/examples/showcase/context.vm
    velocity/tools/trunk/examples/showcase/cookies.vm
    velocity/tools/trunk/examples/showcase/date.vm
    velocity/tools/trunk/examples/showcase/esc.vm
    velocity/tools/trunk/examples/showcase/index.vm
    velocity/tools/trunk/examples/showcase/layout/Default.vm
    velocity/tools/trunk/examples/showcase/layoutmenu.vm
    velocity/tools/trunk/examples/showcase/link.vm
    velocity/tools/trunk/examples/showcase/lists.vm
    velocity/tools/trunk/examples/showcase/math.vm
    velocity/tools/trunk/examples/showcase/mill.vm
    velocity/tools/trunk/examples/showcase/number.vm
    velocity/tools/trunk/examples/showcase/pager.vm
    velocity/tools/trunk/examples/showcase/params.vm
    velocity/tools/trunk/examples/showcase/render.vm
    velocity/tools/trunk/examples/showcase/search.vm
    velocity/tools/trunk/examples/showcase/sorter.vm
    velocity/tools/trunk/examples/showcase/template.txt
    velocity/tools/trunk/examples/showcase/text.vm
    velocity/tools/trunk/examples/showcase/toolmenu.vm

Modified: velocity/tools/trunk/examples/showcase/Error.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/Error.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/Error.vm (original)
+++ velocity/tools/trunk/examples/showcase/Error.vm Wed Feb 14 19:30:10 2007
@@ -20,7 +20,7 @@
 #title( "Error - $!cause.class.name" )
 
 <div align="center">
-<h1>There has been an error!</h1>
+<h1>$text.error.header</h1>
 <br>
 <b style="color: #FF0000;">
 #if( $invocation_exception )
@@ -44,5 +44,5 @@
 $stack_trace
 </pre>
 </div>
-<h3>Sorry about that!</h3>
+<h3>$text.error.sorry</h3>
 </div>

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=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/VM_global_library.vm (original)
+++ velocity/tools/trunk/examples/showcase/VM_global_library.vm Wed Feb 14 19:30:10 2007
@@ -33,8 +33,8 @@
 #**
  * Creates a list item for the toolmenu.
  *#
-#macro( toolMenuItem $menulink $page $name )
-  <li><a href="$menulink.relative("${page}.vm")">$name</a></li>
+#macro( toolMenuItem $menulink $tool )
+  <li><a href="$menulink.relative("${tool}.vm")">$text.tools.get($tool)</a></li>
 #end
 
 
@@ -43,19 +43,20 @@
  * Creates the start tag and header row for a function demonstration table.
  *#
 #macro( demoTableStart )
+#set( $demo = $text.demo )
 <table border="1" cellspacing="0" cellpadding="3">
 <tr>
-  <th>Function</th>
+  <th>$demo.function</th>
   <form method="get" action="$link.self">
   <th nowrap="1">
-    Demo Result
-    <input style="font-size: 8pt" type="submit" value="Clear All">
+    $demo.result
+    <input style="font-size: 8pt" type="submit" value="$demo.clear">
   </th>
   #if( $params.layout )
     <input type="hidden" name="layout" value="$params.layout">
   #end
   </form>
-  <th>Description</th>
+  <th>$demo.description</th>
 </tr>
 #end
 
@@ -100,9 +101,9 @@
       ${esc.d}${toolname}.${method}(${quote}$params.get($method)${quote})
       =
       <div id="${method}">$render.eval("${esc.d}${toolname}.${method}(${quote}$params.get($method)${quote})")</div>
-      <input type="submit" value="Try it!">
+      <input type="submit" value="$text.demo.try">
     #else
-      <input type="submit" value="Try it!">
+      <input type="submit" value="$text.demo.try">
     #end
     #foreach( $param in $request.parameterMap.keySet() )
       #foreach( $value in $params.getStrings($param) )
@@ -137,9 +138,9 @@
       ${esc.d}${toolname}.${method}(${quote}$!params.get(${method1})${quote}, ${quote}$!params.get(${method2})${quote})
       =
       <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!">
+      <input type="submit" value="$text.demo.tryAgain">
     #else
-      <input type="submit" value="Try it!">
+      <input type="submit" value="$text.demo.try">
     #end
     #foreach( $param in $request.parameterMap.keySet() )
       #foreach( $value in $params.getStrings($param) )
@@ -176,9 +177,9 @@
       ${esc.d}${toolname}.${method}(${quote}$!params.get(${method1})${quote}, ${quote}$!params.get(${method2})${quote}, ${quote}$!params.get(${method3})${quote})
       =
       <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!">
+      <input type="submit" value="$text.demo.tryAgain">
     #else
-      <input type="submit" value="Try it!">
+      <input type="submit" value="$text.demo.try">
     #end
     #foreach( $param in $request.parameterMap.keySet() )
       #foreach( $value in $params.getStrings($param) )
@@ -209,9 +210,9 @@
       $params.custom
       =
       $render.eval($params.custom)
-      <input type="submit" value="Try again!">
+      <input type="submit" value="$text.demo.tryAgain">
     #else
-      <input type="submit" value="Try it!">
+      <input type="submit" value="$text.demo.try">
     #end
     #foreach( $param in $request.parameterMap.keySet() )
       #foreach( $value in $params.getStrings($param) )
@@ -221,7 +222,7 @@
       #end
     #end
   </td>
-  <td>Try any code out here.</td>
+  <td>$text.demo.tryAnything</td>
   </form>
 </tr>
 #end

Modified: velocity/tools/trunk/examples/showcase/WEB-INF/src/resources.properties
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/WEB-INF/src/resources.properties?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/WEB-INF/src/resources.properties (original)
+++ velocity/tools/trunk/examples/showcase/WEB-INF/src/resources.properties Wed Feb 14 19:30:10 2007
@@ -1,3 +1,64 @@
+## text.vm demo
 foo = bar
 hello.whoever = Hello {0}!
 world = World
+
+## Error.vm
+error.header = There has been an error!
+error.sorry = There has been an error!
+
+## Default.vm
+css.name = CSS Layout
+css.issuesHeader = Known Issues
+css.issues = This layout fails in IE4.5/Mac. That browser has poor support for CSS absolute positioning, yet it recognizes and executes the CSS @import statement used to hide CSS from broken browsers. Currently, there is no known solution.
+css.niftyHeader = Nifty Layout Techniques
+css.nifty = All sorts of nifty layout can be accomplished using cascading style sheets (CSS). Check out <a href="http://www.bluerobot.com" title="BlueRobot layout Resource">bluerobot.com</a> and the <a href="http://www.bluerobot.com/web/layouts/">Layout Reservoir</A> 
+
+## index.vm
+index.greeting = Hi
+index.explanation = This is a demo application meant to showcase the abilities of \
+the various tools provided by the VelocityTools library, as well \
+as some best practices for using them with the VelocityView servlets.
+index.start = To begin, choose a tool from the menu.
+
+## layoutmenu.vm
+layouts.header = Choose a layout
+layouts.css = CSS Layout
+layouts.simple = Simple Layout
+layouts.table = Table Layout
+layouts.print = Print Layout
+
+## toolmenu.vm
+tools.header = Choose a tool
+tools.alternator = AlternatorTool
+tools.browser = BrowserSniffer
+tools.context = ContextTool
+tools.cookies = CookieTool
+tools.date = DateTool
+tools.esc = EscapeTool
+tools.import = ImportTool
+tools.link = LinkTool
+tools.lists = ListTool
+tools.math = MathTool
+tools.mill = IteratorTool
+tools.number = NumberTool
+tools.pager = PagerTool
+tools.params = ParameterParser
+tools.render = RenderTool
+tools.text = ResourceTool
+tools.search = SearchTool
+tools.sorter = SortTool
+
+## VM_global_library.vm
+demo.function = Function
+demo.result = Demo Result
+demo.clear = Clear All
+demo.description = Description
+demo.try = Try it!
+demo.tryAgain = Try Again!
+demo.tryAnything = Try any code out here.
+
+## demo common resources
+demos.thisPage = This page demonstrates functions of the {0}
+demos.mainExampleHeader = Example Display
+demos.mainResultsIntro = Your code returned the following results

Modified: velocity/tools/trunk/examples/showcase/alternator.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/alternator.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/alternator.vm (original)
+++ velocity/tools/trunk/examples/showcase/alternator.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'AlternatorTool' )
 <p>
-This page demonstrates functions of the #doclink( 'AlternatorTool' true ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'AlternatorTool' true )").
 The <a href="#fullDemo">example</a> at the bottom is a good demonstration of the
 difference between an automatic #doclink( 'Alternator' true ) and a manual one.
 </p>
@@ -50,7 +51,7 @@
 </table>
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
 <form method="post" action="$link.self.anchor('fullDemo')">
 <textarea name="demo" rows="6" cols="65">##
 #if( $params.demo )##
@@ -72,7 +73,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/browser.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/browser.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/browser.vm (original)
+++ velocity/tools/trunk/examples/showcase/browser.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'BrowserSniffer' )
 <p>
-This page demonstrates functions of the #doclink( 'BrowserSnifferTool' false ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'BrowserSnifferTool' false )").
 </p>
 
 #demoTableStart()

Modified: velocity/tools/trunk/examples/showcase/context.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/context.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/context.vm (original)
+++ velocity/tools/trunk/examples/showcase/context.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'ContextTool' )
 <p>
-This page demonstrates functions of the #doclink( 'ContextTool' false ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'ContextTool' false )").
 </p>
 
 #demoTableStart()
@@ -43,7 +44,7 @@
 </table>
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
 <form method="post" action="$link.self.anchor('fullDemo')">
 <textarea name="demo" rows="6" cols="65">##
 #if( $params.demo )##
@@ -62,7 +63,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/cookies.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/cookies.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/cookies.vm (original)
+++ velocity/tools/trunk/examples/showcase/cookies.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'CookieTool' )
 <p>
-This page demonstrates functions of the #doclink( 'CookieTool' false ).  Remember,
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'CookieTool' false )").  Remember,
 when adding a cookie, it is <b>not</b> added to the same request which does the
 adding.  This means to see a cookie you've added, you must add it, and then refresh
 the page again.
@@ -46,7 +47,7 @@
 </table>
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
 <form method="post" action="$link.self.anchor('fullDemo')">
 <textarea name="demo" rows="3" cols="65">##
 #if( $params.demo )##
@@ -65,7 +66,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/date.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/date.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/date.vm (original)
+++ velocity/tools/trunk/examples/showcase/date.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'DateTool' )
 <p>
-This page demonstrates functions of the #doclink( 'DateTool' true ).  As the DateTool
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'DateTool' true )").  As the DateTool
 is quite full-featured and provides many similar functions with varying and
 strongly-typed options, not all functions are demonstrated below.  See the javadoc
 for a full listing of available functions.
@@ -89,7 +90,7 @@
 </table>
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
 <form method="post" action="$link.self.anchor('fullDemo')">
 <textarea name="demo" rows="8" cols="65">##
 #if( $params.demo )##
@@ -113,7 +114,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/esc.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/esc.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/esc.vm (original)
+++ velocity/tools/trunk/examples/showcase/esc.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'EscapeTool' )
 <p>
-This page demonstrates functions of the #doclink( 'EscapeTool' true ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'EscapeTool' true )").
 </p>
 
 #demoTableStart()
@@ -86,7 +87,7 @@
 #set( $sql = "McHale's Navy" )
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
 <form method="post" action="$link.self.anchor('fullDemo')">
 <textarea name="demo" rows="10" cols="65">##
 #if( $params.demo )##
@@ -137,7 +138,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/index.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/index.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/index.vm (original)
+++ velocity/tools/trunk/examples/showcase/index.vm Wed Feb 14 19:30:10 2007
@@ -14,13 +14,9 @@
 ## KIND, either express or implied.  See the License for the
 ## specific language governing permissions and limitations
 ## under the License.
-<p>Hi!</p>
+#set( $index = $text.index )
+<p>$index.greeting!</p>
 
-<p>
-This is a demo application meant to showcase the abilities of
-the various tools provided by the VelocityTools library, as well
-as some best practices for using them with the VelocityView
-servlets.
-</p>
+<p>$index.explanation</p>
 
-<p>To begin, choose a tool from the menu.</p>
+<p>$index.start</p>

Modified: velocity/tools/trunk/examples/showcase/layout/Default.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/layout/Default.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/layout/Default.vm (original)
+++ velocity/tools/trunk/examples/showcase/layout/Default.vm Wed Feb 14 19:30:10 2007
@@ -19,16 +19,17 @@
 "http://www.w3.org/TR/html4/strict.dtd">
 
 #set( $stylesheet = '/layout/layout.css' )
+#set( $css = $text.css )
 #parse( 'header.vm' )
 
 <div class="content">
-	<h1>CSS Layout</h1>
+	<h1>$css.name</h1>
 	<p>$screen_content</p>
 </div>
 
 <div class="content">
-	<h2>Known Issues</h2>
-	<p>This layout fails in IE4.5/Mac. That browser has poor support for CSS absolute positioning, yet it recognizes and executes the CSS @import statement used to hide CSS from broken browsers. Currently, there is no known solution.</p>
+	<h2>$css.issuesHeader</h2>
+	<p>$css.issues</p>
 </div>
 
 
@@ -47,8 +48,8 @@
     #parse( 'layoutmenu.vm' )
   </div>
 
-	<h2>Nifty Layout Techniques</h2>
-	<p>All sorts of nifty layout can be accomplished using cascading style sheets (CSS). Check out <a href="http://www.bluerobot.com" title="BlueRobot layout Resource">bluerobot.com</a> and the <a href="http://www.bluerobot.com/web/layouts/">Layout Reservoir</A> </p>
+	<h2>$css.niftyHeader</h2>
+	<p>$css.nifty</p>
 </div>
 
 <!-- BlueRobot was here. -->

Modified: velocity/tools/trunk/examples/showcase/layoutmenu.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/layoutmenu.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/layoutmenu.vm (original)
+++ velocity/tools/trunk/examples/showcase/layoutmenu.vm Wed Feb 14 19:30:10 2007
@@ -15,10 +15,11 @@
 ## specific language governing permissions and limitations
 ## under the License.
 #set( $slink = $link.self )
-<h3>Choose a layout:</h3>
+#set( $layouts = $text.layouts )
+<h3>$layouts.header:</h3>
 <ul>
-  <li><a href="$slink">CSS Layout</a></li>
-  <li><a href="$slink.layout('Simple')">Simple Layout</a></li>
-  <li><a href="$slink.layout('Table')">Table Layout</a></li>
-  <li><a href="$slink.layout('Print')">Print Layout</a></li>
+  <li><a href="$slink">$layouts.css</a></li>
+  <li><a href="$slink.layout('Simple')">$layouts.simple</a></li>
+  <li><a href="$slink.layout('Table')">$layouts.table</a></li>
+  <li><a href="$slink.layout('Print')">$layouts.print</a></li>
 </ul>

Modified: velocity/tools/trunk/examples/showcase/link.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/link.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/link.vm (original)
+++ velocity/tools/trunk/examples/showcase/link.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'LinkTool' )
 <p>
-This page demonstrates functions of the #doclink( 'LinkTool' false ). This tool
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'LinkTool' false )"). This tool
 is somewhat unusual in that every method that takes parameters will return a new
 instance of the tool that is a copy of the one the method was called upon, with
 the additional change specified by the method call.
@@ -93,7 +94,7 @@
 #set( $base = $link.self.anchor('fullDemo') )
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
 <form method="post" action="$link.self.anchor('fullDemo')">
 <textarea name="demo" rows="5" cols="65">##
 #if( $params.demo )##
@@ -114,7 +115,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/lists.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/lists.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/lists.vm (original)
+++ velocity/tools/trunk/examples/showcase/lists.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'ListTool' )
 <p>
-This page demonstrates functions of the #doclink( 'ListTool' true ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'ListTool' true )").
 </p>
 
 #demoTableStart()
@@ -50,7 +51,7 @@
 
 #set( $primes = [1, 2, 3, 5, 7, 11] )
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
 <form method="post" action="$link.self.anchor('fullDemo')">
 <textarea name="demo" rows="7" cols="65">##
 #if( $params.demo )##
@@ -73,7 +74,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/math.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/math.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/math.vm (original)
+++ velocity/tools/trunk/examples/showcase/math.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'MathTool' )
 <p>
-This page demonstrates functions of the #doclink( 'MathTool' true ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'MathTool' true )").
 </p>
 
 #demoTableStart()

Modified: velocity/tools/trunk/examples/showcase/mill.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/mill.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/mill.vm (original)
+++ velocity/tools/trunk/examples/showcase/mill.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'IteratorTool' )
 <p>
-This page demonstrates functions of the #doclink( 'IteratorTool' true ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'IteratorTool' true )").
 This tool is a convenience tool to use with ${esc.h}foreach loops. It wraps a
 list to let the designer specify a condition to terminate the loop,
 and reuse the same list in different loops.
@@ -44,7 +45,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/number.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/number.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/number.vm (original)
+++ velocity/tools/trunk/examples/showcase/number.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'NumberTool' )
 <p>
-This page demonstrates functions of the #doclink( 'NumberTool' true ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'NumberTool' true )").
 </p>
 
 #demoTableStart()

Modified: velocity/tools/trunk/examples/showcase/pager.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/pager.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/pager.vm (original)
+++ velocity/tools/trunk/examples/showcase/pager.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'AbstractPagerTool' )
 <p>
-This page demonstrates functions of the #doclink( 'AbstractPagerTool' false ).  In this
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'AbstractPagerTool' false )").  In this
 case, we are working with a simple implementation called "MyPagerTool".
 </p>
 
@@ -97,7 +98,7 @@
 </table>
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
   #if( $pager.hasItems() )
     <div align="left">
       Showing $!pager.pageDescription<br>

Modified: velocity/tools/trunk/examples/showcase/params.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/params.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/params.vm (original)
+++ velocity/tools/trunk/examples/showcase/params.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'ParameterParser' )
 <p>
-This page demonstrates functions of the #doclink( 'ParameterParser' false ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'ParameterParser' false )").
 </p>
 
 #demoTableStart()

Modified: velocity/tools/trunk/examples/showcase/render.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/render.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/render.vm (original)
+++ velocity/tools/trunk/examples/showcase/render.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'ViewRenderTool' )
 <p>
-This page demonstrates functions of the #doclink( 'ViewRenderTool' false ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'ViewRenderTool' false )").
 </p>
 
 #demoTableStart()
@@ -32,7 +33,7 @@
 </table>
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
 <form method="post" action="$link.self.anchor('fullDemo')">
 <textarea name="demo" rows="7" cols="65">##
 #if( $params.demo )##
@@ -59,7 +60,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/search.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/search.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/search.vm (original)
+++ velocity/tools/trunk/examples/showcase/search.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'AbstractSearchTool' )
 <p>
-This page demonstrates functions of the #doclink( 'AbstractSearchTool' false ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'AbstractSearchTool' false )").
 In this case, we are working with a simplistic, demonstration implementation
 called "MySearchTool".
 </p>
@@ -104,7 +105,7 @@
 </table>
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
    <form name="search" method="get" action="$link.self.anchor('fullDemo')">
      <input type="text"name="find" value="$!search.criteria">
      <input type="submit" value="Find">

Modified: velocity/tools/trunk/examples/showcase/sorter.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/sorter.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/sorter.vm (original)
+++ velocity/tools/trunk/examples/showcase/sorter.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'SortTool' )
 <p>
-This page demonstrates functions of the #doclink( 'SortTool' true ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'SortTool' true )").
 </p>
 
 #demoTableStart()

Modified: velocity/tools/trunk/examples/showcase/template.txt
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/template.txt?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/template.txt (original)
+++ velocity/tools/trunk/examples/showcase/template.txt Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 
 <p>
-This page demonstrates functions of the #doclink( 'FooTool' true ).
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'FooTool' true )").
 </p>
 
 <table border="1" cellspacing="0" cellpadding="3">

Modified: velocity/tools/trunk/examples/showcase/text.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/text.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/text.vm (original)
+++ velocity/tools/trunk/examples/showcase/text.vm Wed Feb 14 19:30:10 2007
@@ -16,7 +16,8 @@
 ## under the License.
 #title( 'ResourceTool' )
 <p>
-This page demonstrates functions of the #doclink( 'ViewResourceTool' false ).  This tool
+#set( $demos = $text.demos )
+$demos.thisPage.insert("#doclink( 'ViewResourceTool' false )").  This tool
 is similar to the <a href="$link.relative('link.vm')">LinkTool</a> in that most methods
 return a new object that has mostly the same methods as the original, allowing you
 to build up parameters elegantly and simply, rather than try to remember how to use
@@ -56,7 +57,7 @@
 </table>
 
 <div align="center">
-  <a name="fullDemo"><h3>Example Display</h3></a>
+  <a name="fullDemo"><h3>$demos.mainExampleHeader</h3></a>
 <form method="post" action="$link.self.anchor('fullDemo')">
 <textarea name="demo" rows="6" cols="65">##
 #if( $params.demo )##
@@ -76,7 +77,7 @@
 </form>
 
 #if( $params.demo )
-Your code returned the following results:
+$demos.mainResultsIntro:
 <pre>
   $render.eval($params.demo)
 </pre>

Modified: velocity/tools/trunk/examples/showcase/toolmenu.vm
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/examples/showcase/toolmenu.vm?view=diff&rev=507799&r1=507798&r2=507799
==============================================================================
--- velocity/tools/trunk/examples/showcase/toolmenu.vm (original)
+++ velocity/tools/trunk/examples/showcase/toolmenu.vm Wed Feb 14 19:30:10 2007
@@ -19,24 +19,25 @@
 #else
   #set( $llink = $link)
 #end
-<h3>Choose a tool:</h3>
+#set( $tools = $text.tools )
+<h3>$tools.header:</h3>
 <ul>
-#toolMenuItem( $llink 'alternator' 'AlternatorTool' )
-#toolMenuItem( $llink 'browser'    'BrowserSniffer' )
-#toolMenuItem( $llink 'context'    'ContextTool' )
-#toolMenuItem( $llink 'cookies'    'CookieTool' )
-#toolMenuItem( $llink 'date'       'DateTool' )
-#toolMenuItem( $llink 'esc'        'EscapeTool' )
-#toolMenuItem( $llink 'import'     'ImportTool' )
-#toolMenuItem( $llink 'link'       'LinkTool' )
-#toolMenuItem( $llink 'lists'      'ListTool' )
-#toolMenuItem( $llink 'math'       'MathTool' )
-#toolMenuItem( $llink 'mill'       'IteratorTool' )
-#toolMenuItem( $llink 'number'     'NumberTool' )
-#toolMenuItem( $llink 'pager'      'PagerTool' )
-#toolMenuItem( $llink 'params'     'ParameterParser' )
-#toolMenuItem( $llink 'render'     'RenderTool' )
-#toolMenuItem( $llink 'text'       'ResourceTool' )
-#toolMenuItem( $llink 'search'     'SearchTool' )
-#toolMenuItem( $llink 'sorter'     'SortTool' )
+#toolMenuItem( $llink 'alternator' )
+#toolMenuItem( $llink 'browser' )
+#toolMenuItem( $llink 'context' )
+#toolMenuItem( $llink 'cookies' )
+#toolMenuItem( $llink 'date' )
+#toolMenuItem( $llink 'esc' )
+#toolMenuItem( $llink 'import' )
+#toolMenuItem( $llink 'link' )
+#toolMenuItem( $llink 'lists' )
+#toolMenuItem( $llink 'math' )
+#toolMenuItem( $llink 'mill' )
+#toolMenuItem( $llink 'number' )
+#toolMenuItem( $llink 'pager' )
+#toolMenuItem( $llink 'params' )
+#toolMenuItem( $llink 'render' )
+#toolMenuItem( $llink 'text' )
+#toolMenuItem( $llink 'search' )
+#toolMenuItem( $llink 'sorter' )
 </ul>