Package org.apache.velocity.tools.struts
Class MessageResourcesTool
- java.lang.Object
-
- org.apache.velocity.tools.struts.MessageResourcesTool
-
- Direct Known Subclasses:
ActionMessagesTool,MessageTool
public abstract class MessageResourcesTool extends Object
Abstract view tool that provides access to Struts' message resources.
- Since:
- VelocityTools 1.1
- Version:
- $Id$
- Author:
- Nathan Bubna
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.servlet.ServletContextapplicationprotected org.apache.velocity.runtime.log.LogLOGprotected javax.servlet.http.HttpServletRequestrequest
-
Constructor Summary
Constructors Constructor Description MessageResourcesTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidconfigure(Map params)Initializes this tool.protected LocalegetLocale()Retrieves theLocalefor this request.protected org.apache.struts.util.MessageResourcesgetResources(String bundle)Retrieves the specifiedMessageResourcesbundle, or the application's default MessageResources if no bundle is specified.voidinit(Object obj)Deprecated.
-
-
-
Method Detail
-
init
@Deprecated public void init(Object obj)
Deprecated.
-
configure
public void configure(Map params)
Initializes this tool.- Parameters:
params- the Map of configuration parameters- Throws:
IllegalArgumentException- if the param is not a ViewContext
-
getLocale
protected Locale getLocale()
Retrieves theLocalefor this request.- Since:
- VelocityTools 2.0
-
getResources
protected org.apache.struts.util.MessageResources getResources(String bundle)
Retrieves the specifiedMessageResourcesbundle, or the application's default MessageResources if no bundle is specified.- Since:
- VelocityTools 1.1
-
-