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><tool>
- <key>actionmsgs</key>
+ <key>messages</key>
<scope>request</scope>
<class>org.apache.velocity.tools.struts.ActionMessagesTool</class>
</tool></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>#macro (actionmsgsMarkup)
- #if ($actionmsgs.exist)
+<sourcecode>#macro (messagesMarkup)
+ #if ($messages.exist)
<ul>
- #foreach ($e in $actionmsgs.all )
+ #foreach ($e in $messages.all )
<li>$e</li>
#end
</ul>
@@ -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>#macro (actionmsgsMarkup $property)
- #if ($actionmsgs.exist($property))
+<sourcecode>#macro (messagesMarkup $property)
+ #if ($messages.exist($property))
<ul>
- #foreach ($er in $actionmsgs.get($property) )
+ #foreach ($er in $messages.get($property) )
<li>$er</li>
#end
</ul>
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><tool>
- <key>msg</key>
+ <key>text</key>
<scope>request</scope>
<class>org.apache.velocity.tools.struts.MessageTool</class>
</tool></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