Class 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$
    Author:
    Nathan Bubna
    • Field Detail

      • LOG

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

        protected javax.servlet.ServletContext application
      • request

        protected javax.servlet.http.HttpServletRequest request
    • Constructor Detail

      • MessageResourcesTool

        public MessageResourcesTool()
    • Method Detail

      • 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