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  javax.servlet.ServletContext application
           
protected  Log LOG
           
protected  javax.servlet.http.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 Log LOG

application

protected javax.servlet.ServletContext application

request

protected javax.servlet.http.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-2010 Apache Software Foundation. All Rights Reserved.