dgraham     2003/07/26 12:04:07

  Modified:    src/share/org/apache/struts/util RequestUtils.java
               src/share/org/apache/struts/taglib TagUtils.java
  Log:
  Moved other message() method to TagUtils.
  
  Revision  Changes    Path
  1.126     +12 -7     
jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java
  
  Index: RequestUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java,v
  retrieving revision 1.125
  retrieving revision 1.126
  diff -u -r1.125 -r1.126
  --- RequestUtils.java 26 Jul 2003 18:58:36 -0000      1.125
  +++ RequestUtils.java 26 Jul 2003 19:04:07 -0000      1.126
  @@ -825,12 +825,17 @@
        *
        * @exception JspException if a lookup error occurs (will have been
        *  saved in the request already)
  +     * @deprecated Use TagUtils.message() instead.  This will be removed after
  +     * Struts 1.2.
        */
  -    public static String message(PageContext pageContext, String bundle, String 
locale, String key)
  +    public static String message(
  +        PageContext pageContext,
  +        String bundle,
  +        String locale,
  +        String key)
           throws JspException {
   
  -        return (message(pageContext, bundle, locale, key, null));
  -
  +        return TagUtils.getInstance().message(pageContext, bundle, locale, key);
       }
   
       /**
  
  
  
  1.13      +28 -4     jakarta-struts/src/share/org/apache/struts/taglib/TagUtils.java
  
  Index: TagUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/TagUtils.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TagUtils.java     26 Jul 2003 19:01:12 -0000      1.12
  +++ TagUtils.java     26 Jul 2003 19:04:07 -0000      1.13
  @@ -578,6 +578,30 @@
        *  message resources bundle
        * @param locale Name of the session attribute for our user's Locale
        * @param key Message key to be looked up and returned
  +     * @return message string
  +     *
  +     * @exception JspException if a lookup error occurs (will have been
  +     *  saved in the request already)
  +     */
  +    public String message(
  +        PageContext pageContext,
  +        String bundle,
  +        String locale,
  +        String key)
  +        throws JspException {
  +
  +        return message(pageContext, bundle, locale, key, null);
  +
  +    }
  +    
  +    /**
  +     * Look up and return a message string, based on the specified parameters.
  +     *
  +     * @param pageContext The PageContext associated with this request
  +     * @param bundle Name of the servlet context attribute for our
  +     *  message resources bundle
  +     * @param locale Name of the session attribute for our user's Locale
  +     * @param key Message key to be looked up and returned
        * @param args Replacement parameters for this message
        * @return message string
        * @exception JspException if a lookup error occurs (will have been
  
  
  

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

Reply via email to