You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2001/04/16 17:33:17 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/util BeanUtils.java

craigmcc    01/04/16 08:33:17

  Modified:    src/share/org/apache/struts/util BeanUtils.java
  Log:
  Port a fix from the "commons" version of this module (which Struts will
  ultimately migrate to when the commons version is released).
  
  Revision  Changes    Path
  1.27      +10 -5     jakarta-struts/src/share/org/apache/struts/util/BeanUtils.java
  
  Index: BeanUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/util/BeanUtils.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- BeanUtils.java	2001/02/12 00:32:12	1.26
  +++ BeanUtils.java	2001/04/16 15:33:16	1.27
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/util/BeanUtils.java,v 1.26 2001/02/12 00:32:12 craigmcc Exp $
  - * $Revision: 1.26 $
  - * $Date: 2001/02/12 00:32:12 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/util/BeanUtils.java,v 1.27 2001/04/16 15:33:16 craigmcc Exp $
  + * $Revision: 1.27 $
  + * $Date: 2001/04/16 15:33:16 $
    *
    * ====================================================================
    *
  @@ -83,7 +83,7 @@
    * @author Craig R. McClanahan
    * @author Ralph Schaer
    * @author Chris Audley
  - * @version $Revision: 1.26 $ $Date: 2001/02/12 00:32:12 $
  + * @version $Revision: 1.27 $ $Date: 2001/04/16 15:33:16 $
    */
   
   public final class BeanUtils {
  @@ -268,7 +268,12 @@
   	throws IllegalAccessException, InvocationTargetException,
   	       NoSuchMethodException {
   
  -        Object value = PropertyUtils.getIndexedProperty(bean, name);
  +        StringBuffer sb = new StringBuffer(name);
  +        sb.append(PropertyUtils.INDEXED_DELIM);
  +        sb.append(index);
  +        sb.append(PropertyUtils.INDEXED_DELIM2);
  +        Object value = PropertyUtils.getIndexedProperty(bean,
  +                                                        sb.toString());
           return (ConvertUtils.convert(value));
   
       }
  
  
  

Re: cvs commit: jakarta-struts/src/share/org/apache/struts/util BeanUtils.java

Posted by Scott Sanders <sa...@totalsync.com>.
Incze Lajos wrote:

>>   Port a fix from the "commons" version of this module (which Struts will
>>   ultimately migrate to when the commons version is released).
>>   
> 
> 
> Just some questions. Will the beanutils be facotred out from struts
> or they will remain here (with some sort of sync mechanism)? Also,
> are there other candidates to be factored out to commons (e.g.
> digester)?                                                  incze

As I understand from the commons mailing list, Craig said that Struts 
1.0 would use what it has now, and then switch over post 1.0.  Correct 
me if I am wrong, Craig.


I have just committed digester to jakarta-commons-sandbox.  Feel free to 
come on over and help out ;-)

Scott Sanders


Re: cvs commit: jakarta-struts/src/share/org/apache/struts/utilBeanUtils.java

Posted by Ted Husted <hu...@apache.org>.
+1

"Craig R. McClanahan" wrote:
> 
> On Tue, 17 Apr 2001, Incze Lajos wrote:
> 
> > >   Port a fix from the "commons" version of this module (which Struts will
> > >   ultimately migrate to when the commons version is released).
> > >
> >
> > Just some questions. Will the beanutils be facotred out from struts
> > or they will remain here (with some sort of sync mechanism)? Also,
> > are there other candidates to be factored out to commons (e.g.
> > digester)?                                                  incze
> >
> 
> We haven't talked much here on STRUTS-DEV about the "Commons" project -- I
> suggest that people take a look:
>         http://jakarta.apache.org/commons
> and subscribe to the JAKARTA-COMMONS mailing list if they are
> interested.  The basic idea is to make it easier to share components of
> existing Jakarta subprojects with the other subprojects (and vice
> versa).  My initial contributions have been the bean utilities classes and
> the Digester.
> 
> IMHO, we're too close to a 1.0 final release to go mucking around with
> APIs people are currently depending on.  Therefore, the approach I'd like
> to take is:
> 
> * For Struts 1.0 continue to use the internal versions of beanutils
>   and digester, but deprecate them (manually synching changes as
>   appropriate).
> 
> * For Struts 1.1, remove the internal versions and migrate to the
>   new ones in Commons.
> 
> * If any additional pieces of Struts get factored out, follow the same
>   basic strategy.
> 
> It is also possible that some of the functionality on the 1.1 TODO list
> will be implemented (at least partially) as Commons packages, to the
> extent that it is general purpose in nature and not dependent on the
> Struts framework.
> 
> Craig

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/

Re: cvs commit: jakarta-struts/src/share/org/apache/struts/util BeanUtils.java

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 17 Apr 2001, Incze Lajos wrote:

> >   Port a fix from the "commons" version of this module (which Struts will
> >   ultimately migrate to when the commons version is released).
> >   
> 
> Just some questions. Will the beanutils be facotred out from struts
> or they will remain here (with some sort of sync mechanism)? Also,
> are there other candidates to be factored out to commons (e.g.
> digester)?                                                  incze
> 

We haven't talked much here on STRUTS-DEV about the "Commons" project -- I
suggest that people take a look:
	http://jakarta.apache.org/commons
and subscribe to the JAKARTA-COMMONS mailing list if they are
interested.  The basic idea is to make it easier to share components of
existing Jakarta subprojects with the other subprojects (and vice
versa).  My initial contributions have been the bean utilities classes and
the Digester.

IMHO, we're too close to a 1.0 final release to go mucking around with
APIs people are currently depending on.  Therefore, the approach I'd like
to take is:

* For Struts 1.0 continue to use the internal versions of beanutils
  and digester, but deprecate them (manually synching changes as
  appropriate).

* For Struts 1.1, remove the internal versions and migrate to the
  new ones in Commons.

* If any additional pieces of Struts get factored out, follow the same
  basic strategy.

It is also possible that some of the functionality on the 1.1 TODO list
will be implemented (at least partially) as Commons packages, to the
extent that it is general purpose in nature and not dependent on the
Struts framework.

Craig



Re: cvs commit: jakarta-struts/src/share/org/apache/struts/util BeanUtils.java

Posted by Incze Lajos <in...@mail.matav.hu>.
>   Port a fix from the "commons" version of this module (which Struts will
>   ultimately migrate to when the commons version is released).
>   

Just some questions. Will the beanutils be facotred out from struts
or they will remain here (with some sort of sync mechanism)? Also,
are there other candidates to be factored out to commons (e.g.
digester)?                                                  incze