org.apache.velocity.tools.struts
Class MessageResourcesTool

java.lang.Object
  extended by 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: MessageResourcesTool.java 595822 2007-11-16 21:07:51Z nbubna $
Author:
Nathan Bubna

Field Summary
protected  ServletContext application
           
protected  org.apache.velocity.runtime.log.Log LOG
           
protected  HttpServletRequest request
           
 
Constructor Summary
MessageResourcesTool()
           
 
Method Summary
 void configure(Map params)
          Initializes this tool.
protected  Locale getLocale()
          Retrieves the Locale for this request.
protected  org.apache.struts.util.MessageResources getResources(String bundle)
          Retrieves the specified MessageResources bundle, or the application's default MessageResources if no bundle is specified.
 void init(Object obj)
          Deprecated. 
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected org.apache.velocity.runtime.log.Log LOG

application

protected ServletContext application

request

protected HttpServletRequest request
Constructor Detail

MessageResourcesTool

public MessageResourcesTool()
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 the Locale for this request.

Since:
VelocityTools 2.0

getResources

protected org.apache.struts.util.MessageResources getResources(String bundle)
Retrieves the specified MessageResources bundle, or the application's default MessageResources if no bundle is specified.

Since:
VelocityTools 1.1


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.