Class 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

      Fields 
      Modifier and Type Field Description
      protected javax.servlet.ServletContext application  
      protected java.util.Locale locale  
      protected static org.apache.commons.logging.Log LOG  
      protected javax.servlet.http.HttpServletRequest request  
      protected org.apache.struts.util.MessageResources resources  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.apache.struts.util.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 org.apache.commons.logging.Log LOG
      • application

        protected javax.servlet.ServletContext application
      • request

        protected javax.servlet.http.HttpServletRequest request
      • locale

        protected java.util.Locale locale
      • resources

        protected org.apache.struts.util.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 org.apache.struts.util.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