dgraham     2003/07/25 16:55:37

  Modified:    src/share/org/apache/struts/validator Resources.java
  Log:
  Use RequestUtils.getModuleConfig().
  
  Revision  Changes    Path
  1.17      +12 -11    
jakarta-struts/src/share/org/apache/struts/validator/Resources.java
  
  Index: Resources.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/validator/Resources.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Resources.java    25 Jul 2003 23:51:31 -0000      1.16
  +++ Resources.java    25 Jul 2003 23:55:37 -0000      1.17
  @@ -73,8 +73,8 @@
   import org.apache.struts.Globals;
   import org.apache.struts.action.ActionError;
   import org.apache.struts.action.ActionErrors;
  -import org.apache.struts.config.ModuleConfig;
   import org.apache.struts.util.MessageResources;
  +import org.apache.struts.util.RequestUtils;
   
   /**
    * This class helps provides some useful methods for retrieving objects
  @@ -82,6 +82,7 @@
    *
    * @author David Winterfeldt
    * @author Eddie Bush
  + * @author David Graham
    * @version $Revision$ $Date$
    * @since Struts 1.1
    */
  @@ -123,15 +124,15 @@
   
     /**
      * Retrieve <code>ValidatorResources</code> for the current module.
  -   * @param application  Application Context
  -   * @param request     The ServletRequest
  +   * @param application Application Context
  +   * @param request The ServletRequest
      */
       public static ValidatorResources getValidatorResources(
           ServletContext application,
           HttpServletRequest request) {
               
           String prefix =
  -            ((ModuleConfig) request.getAttribute(Globals.MODULE_KEY)).getPrefix();
  +            RequestUtils.getModuleConfig(request, application).getPrefix();
               
           return (ValidatorResources) application.getAttribute(
               ValidatorPlugIn.VALIDATOR_KEY + prefix);
  @@ -191,9 +192,9 @@
       * Gets the locale sensitive message based on the <code>ValidatorAction</code> 
message and the
       * <code>Field</code>'s arg objects.
       * @param messages  The Message resources
  -    * @param locale    The locale
  -    * @param va        The Validator Action
  -    * @param field     The Validator Field
  +    * @param locale The locale
  +    * @param va The Validator Action
  +    * @param field The Validator Field
       */
      public static String getMessage(MessageResources messages, Locale locale,
                                      ValidatorAction va, Field field) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to