org.apache.velocity.tools.struts
Class MessageResourcesTool
java.lang.Object
org.apache.velocity.tools.struts.MessageResourcesTool
- All Implemented Interfaces:
- ViewTool
- Direct Known Subclasses:
- ActionMessagesTool, MessageTool
- public abstract class MessageResourcesTool
- extends java.lang.Object
- implements ViewTool
Abstract view tool that provides access to Struts' message resources.
- Since:
- VelocityTools 1.1
- Version:
- $Id: MessageResourcesTool.html,v 1.4.2.1 2004/05/17 17:09:43 nbubna Exp $
- Author:
- Nathan Bubna
Field Summary |
protected javax.servlet.ServletContext |
application
|
protected java.util.Locale |
locale
|
protected javax.servlet.http.HttpServletRequest |
request
|
protected org.apache.struts.util.MessageResources |
resources
|
Method Summary |
protected org.apache.struts.util.MessageResources |
getResources(java.lang.String bundle)
Retrieves the specified MessageResources bundle, or the
application's default MessageResources if no bundle is specified. |
void |
init(java.lang.Object obj)
Initializes this tool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
application
protected javax.servlet.ServletContext application
request
protected javax.servlet.http.HttpServletRequest request
locale
protected java.util.Locale locale
resources
protected org.apache.struts.util.MessageResources resources
MessageResourcesTool
public MessageResourcesTool()
init
public void init(java.lang.Object obj)
- Initializes this tool.
- Specified by:
init
in interface ViewTool
- Parameters:
obj
- the current ViewContext
- Throws:
java.lang.IllegalArgumentException
- if the param is not a ViewContext
getResources
protected org.apache.struts.util.MessageResources getResources(java.lang.String bundle)
- Retrieves the specified
MessageResources
bundle, or the
application's default MessageResources if no bundle is specified.
- Since:
- VelocityTools 1.1
Copyright (c) 2003 Apache Software Foundation