org.apache.velocity.tools.struts
Class MessageTool.TextKey
java.lang.Object
org.apache.velocity.tools.struts.MessageTool.TextKey
- Enclosing class:
- MessageTool
- public class MessageTool.TextKey
- extends java.lang.Object
Helper class to simplify tool usage when retrieving
no-arg messages from the default bundle that have periods
in their key.
So instead of $text.get("forms.profile.title")
,1
you can just type $text.forms.profile.title
. Also,
this lets you do things like:
#set( $profiletext = $text.forms.profile )
$profiletext.title
$profiletext.subtitle
- Since:
- VelocityTools 1.2
Method Summary |
MessageTool.TextKey |
get(java.lang.String key)
Appends a period and the new key to the current
key and returns a new TextKey instance with the
combined result as its key. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
tool
private MessageTool tool
key
private java.lang.String key
MessageTool.TextKey
public MessageTool.TextKey(MessageTool tool,
java.lang.String key)
get
public MessageTool.TextKey get(java.lang.String key)
- Appends a period and the new key to the current
key and returns a new TextKey instance with the
combined result as its key.
toString
public java.lang.String toString()
Copyright (c) 2003 Apache Software Foundation