You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dg...@apache.org on 2003/07/10 03:12:10 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/tiles/util TagUtils.java

dgraham     2003/07/09 18:12:10

  Modified:    src/share/org/apache/struts/taglib/tiles/util TagUtils.java
  Log:
  Deprecated getProperty() because it provided no value over calling 
  PropertyUtils.getProperty() directly.
  
  Revision  Changes    Path
  1.7       +9 -5      jakarta-struts/src/share/org/apache/struts/taglib/tiles/util/TagUtils.java
  
  Index: TagUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/tiles/util/TagUtils.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TagUtils.java	10 May 2003 17:37:44 -0000	1.6
  +++ TagUtils.java	10 Jul 2003 01:12:10 -0000	1.7
  @@ -128,7 +128,9 @@
        * @exception InvocationTargetException if the property accessor method
        *  throws an exception
        * @exception NoSuchMethodException if an accessor method for this
  -     *  propety cannot be found
  +     *  propety cannot be found.
  +     * @deprecated Use PropertyUtils.getProperty() directly.  This will be removed
  +     * after Struts 1.2.
        */
   	public static Object getProperty(Object bean, String name)
   		throws
  @@ -229,7 +231,7 @@
               Object realValue;
               Object bean = retrieveBean(beanName, beanScope, pageContext);
               if (bean != null && beanProperty != null) {
  -                realValue = getProperty(bean, beanProperty);
  +                realValue = PropertyUtils.getProperty(bean, beanProperty);
               } else {
                   realValue = bean; // value can be null
               }
  @@ -245,6 +247,7 @@
                       + beanScope
                       + "'. (exception : "
                       + ex.getMessage());
  +                    
           } catch (InvocationTargetException ex) {
               throw new JspException(
                   "Error - component.PutAttributeTag : Error while retrieving value from bean '"
  @@ -255,6 +258,7 @@
                       + beanScope
                       + "'. (exception : "
                       + ex.getMessage());
  +                    
           } catch (IllegalAccessException ex) {
               throw new JspException(
                   "Error - component.PutAttributeTag : Error while retrieving value from bean '"
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org