You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by nb...@apache.org on 2004/02/13 01:04:25 UTC

cvs commit: jakarta-velocity-tools/xdocs/struts ActionMessagesTool.xml MessageTool.xml StrutsTools.xml

nbubna      2004/02/12 16:04:25

  Modified:    xdocs/struts ActionMessagesTool.xml MessageTool.xml
                        StrutsTools.xml
  Log:
  document new recommended keys ($text and $messages)
  
  Revision  Changes    Path
  1.4       +12 -12    jakarta-velocity-tools/xdocs/struts/ActionMessagesTool.xml
  
  Index: ActionMessagesTool.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity-tools/xdocs/struts/ActionMessagesTool.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ActionMessagesTool.xml	30 Jan 2004 15:20:28 -0000	1.3
  +++ ActionMessagesTool.xml	13 Feb 2004 00:04:25 -0000	1.4
  @@ -33,11 +33,11 @@
           <toolinfo>
               <version>@@@version@@@, @@@date@@@</version>
               <clazz>org.apache.velocity.tools.struts.ActionMessagesTool</clazz>
  -            <name>$actionmsgs</name>
  +            <name>$messages</name>
               <author email="sidler@teamup.com">Gabriel Sidler</author>
               <author email="nathan@esha.com">Nathan Bubna</author>
               <config-example>&lt;tool&gt;
  -  &lt;key&gt;actionmsgs&lt;/key&gt;
  +  &lt;key&gt;messages&lt;/key&gt;
     &lt;scope&gt;request&lt;/scope&gt;
     &lt;class&gt;org.apache.velocity.tools.struts.ActionMessagesTool&lt;/class&gt;
   &lt;/tool&gt;</config-example>
  @@ -116,9 +116,9 @@
                   number of queued action messages. The <code>property</code> parameter can be used to
                   obtain the number of queued action messages for a specific category.</p>
   
  -<sourcecode>$actionmsgs.getSize()
  -$actionmsgs.size
  -$actionmsgs.getSize("password")</sourcecode>
  +<sourcecode>$messages.getSize()
  +$messages.size
  +$messages.getSize("password")</sourcecode>
               </description>
   
           </method>
  @@ -129,7 +129,7 @@
   
               <abstract>
                   This a convenience method and the equivalent of
  -                <code>$actionmsgs.get($actionmsgs.globalName)</code>
  +                <code>$messages.get($messages.globalName)</code>
               </abstract>
   
               <signature>
  @@ -176,10 +176,10 @@
               <description>
                   <p>The following example shows a macro to render the action messages:</p>
   
  -<sourcecode>&#35;macro (actionmsgsMarkup)
  -    &#35;if (&#36;actionmsgs.exist)
  +<sourcecode>&#35;macro (messagesMarkup)
  +    &#35;if (&#36;messages.exist)
           &lt;ul&gt;
  -        &#35;foreach (&#36;e in &#36;actionmsgs.all )
  +        &#35;foreach (&#36;e in &#36;messages.all )
               &lt;li&gt;&#36;e&lt;/li&gt;
           &#35;end
           &lt;/ul&gt;
  @@ -237,10 +237,10 @@
                   <p>The following example shows a macro to render the action messages for a
                   particular category of action messages:</p>
   
  -<sourcecode>&#35;macro (actionmsgsMarkup &#36;property)
  -    &#35;if (&#36;actionmsgs.exist(&#36;property))
  +<sourcecode>&#35;macro (messagesMarkup &#36;property)
  +    &#35;if (&#36;messages.exist(&#36;property))
           &lt;ul&gt;
  -        &#35;foreach (&#36;er in &#36;actionmsgs.get(&#36;property) )
  +        &#35;foreach (&#36;er in &#36;messages.get(&#36;property) )
               &lt;li&gt;&#36;er&lt;/li&gt;
           &#35;end
           &lt;/ul&gt;
  
  
  
  1.3       +9 -9      jakarta-velocity-tools/xdocs/struts/MessageTool.xml
  
  Index: MessageTool.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity-tools/xdocs/struts/MessageTool.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MessageTool.xml	30 Jan 2004 15:52:09 -0000	1.2
  +++ MessageTool.xml	13 Feb 2004 00:04:25 -0000	1.3
  @@ -21,10 +21,10 @@
           <toolinfo>
               <version>@@@version@@@, @@@date@@@</version>
               <clazz>org.apache.velocity.tools.struts.MessageTool</clazz>
  -            <name>$msg</name>
  +            <name>$text</name>
               <author email="sidler@teamup.com">Gabriel Sidler</author>
               <config-example>&lt;tool&gt;
  -  &lt;key&gt;msg&lt;/key&gt;
  +  &lt;key&gt;text&lt;/key&gt;
     &lt;scope&gt;request&lt;/scope&gt;
     &lt;class&gt;org.apache.velocity.tools.struts.MessageTool&lt;/class&gt;
   &lt;/tool&gt;</config-example>
  @@ -105,9 +105,9 @@
   test=This message has five replacement parameters: {0}, {1}, {2}, {3}, {4}</sourcecode>
   
   <p>then the following Velocity script:</p>
  -<sourcecode>$msg.get("title")
  -$msg.title
  -$msg.get("test", ["bear", "wolf", "tiger"])</sourcecode>
  +<sourcecode>$text.get("title")
  +$text.title
  +$text.get("test", ["bear", "wolf", "tiger"])</sourcecode>
   
   <p>produces this output:</p>
   <sourcecode>Welcome to Velocity for Struts
  @@ -150,7 +150,7 @@
               </returns>
   
               <description>
  -<sourcecode>$msg.exists("title")</sourcecode>
  +<sourcecode>$text.exists("title")</sourcecode>
               </description>
   
           </method>
  @@ -173,9 +173,9 @@
               </returns>
   
               <description>
  -<sourcecode>$msg.getLocale()
  -$msg.locale
  -$msg.getLocale().getDisplayLanguage()</sourcecode>
  +<sourcecode>$text.getLocale()
  +$text.locale
  +$text.getLocale().getDisplayLanguage()</sourcecode>
   
   <p>produces:</p>
   <sourcecode>en
  
  
  
  1.4       +1 -1      jakarta-velocity-tools/xdocs/struts/StrutsTools.xml
  
  Index: StrutsTools.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity-tools/xdocs/struts/StrutsTools.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StrutsTools.xml	31 Jan 2004 14:18:01 -0000	1.3
  +++ StrutsTools.xml	13 Feb 2004 00:04:25 -0000	1.4
  @@ -24,7 +24,7 @@
   
           <p>
           <strong><a href="MessageTool.html">MessageTool</a></strong><br />
  -        Provides access to the Struts message resources for internationalized output.
  +        Provides access to the Struts application resources for internationalized text.
           </p>
   
           <p>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org