Package org.apache.velocity.tools.struts
Class MessageResourcesTool
java.lang.Object
org.apache.velocity.tools.struts.MessageResourcesTool
- Direct Known Subclasses:
ActionMessagesTool,MessageTool
Abstract view tool that provides access to Struts' message resources.
- Since:
- VelocityTools 1.1
- Version:
- $Id: MessageResourcesTool.java 595822 2007-11-16 21:07:51Z nbubna $
- Author:
- Nathan Bubna
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInitializes this tool.protected LocaleRetrieves theLocalefor this request.protected MessageResourcesgetResources(String bundle) Retrieves the specifiedMessageResourcesbundle, or the application's default MessageResources if no bundle is specified.voidDeprecated.
-
Field Details
-
LOG
protected org.apache.velocity.runtime.log.Log LOG -
application
protected ServletContext application -
request
protected HttpServletRequest request -
locale
-
resources
private MessageResources resources
-
-
Constructor Details
-
MessageResourcesTool
public MessageResourcesTool()
-
-
Method Details
-
init
Deprecated. -
configure
Initializes this tool.- Parameters:
params- the Map of configuration parameters- Throws:
IllegalArgumentException- if the param is not a ViewContext
-
getLocale
Retrieves theLocalefor this request.- Since:
- VelocityTools 2.0
-
getResources
Retrieves the specifiedMessageResourcesbundle, or the application's default MessageResources if no bundle is specified.- Since:
- VelocityTools 1.1
-