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 java.lang.Object

Abstract view tool that provides access to Struts' message resources.

Since:
VelocityTools 1.1
Version:
$Id: MessageResourcesTool.java 477914 2006-11-21 21:52:11Z henning $
Author:
Nathan Bubna

Field Summary
protected  ServletContext application
           
protected  java.util.Locale locale
           
protected static Log LOG
           
protected  HttpServletRequest request
           
protected  MessageResources resources
           
 
Constructor Summary
MessageResourcesTool()
           
 
Method Summary
protected  MessageResources getResources(java.lang.String bundle)
          Retrieves the specified MessageResources bundle, or the application's default MessageResources if no bundle is specified.
 void init(java.lang.Object obj)
          Initializes this tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final Log LOG

application

protected ServletContext application

request

protected HttpServletRequest request

locale

protected java.util.Locale locale

resources

protected MessageResources resources
Constructor Detail

MessageResourcesTool

public MessageResourcesTool()
Method Detail

init

public void init(java.lang.Object obj)
Initializes this tool.

Parameters:
obj - the current ViewContext
Throws:
java.lang.IllegalArgumentException - if the param is not a ViewContext

getResources

protected MessageResources getResources(java.lang.String bundle)
Retrieves the specified MessageResources bundle, or the application's default MessageResources if no bundle is specified.

Since:
VelocityTools 1.1


Copyright (c) 2003-2007 Apache Software Foundation