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 TypeMethodDescriptionvoid
Initializes this tool.protected Locale
Retrieves theLocale
for this request.protected MessageResources
getResources
(String bundle) Retrieves the specifiedMessageResources
bundle, or the application's default MessageResources if no bundle is specified.void
Deprecated.
-
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 theLocale
for this request.- Since:
- VelocityTools 2.0
-
getResources
Retrieves the specifiedMessageResources
bundle, or the application's default MessageResources if no bundle is specified.- Since:
- VelocityTools 1.1
-