On Mon, 20 Aug 2001, Gregor Rayman wrote:

> "Ted Husted" <[EMAIL PROTECTED]> wrote:
> 
> 
> > I've added the ZIPs for both of these to More About Struts, where they
> > will be easier to find. 
> > 
> > http://husted.com/about/struts/resources.htm#new
> > 
> > If we can combine the projects, and change Bean-Util once, that would
> > probably be better. 
> 
> It certainly will be better. Jan and I we were already talked about it,
> he will probably use StringKeyedPropertyDescriptor in his dynamic 
> properties as well. 
>  
> > Bean-Util is core class now, and so everything should be thoroughly
> > tested before calling for a vote. 
> 

I'll look at integrating both indexed-setter and keyed property support
into the jakarta-commons beanutils code.  Fair warning -- I'm gonig to
want to see JUnit tests too before a new release :-).

> Of course. I admit (and warn!) that I did not test the sources very well. 
> I did just functional testing. I was not sure, whether the changes are
> wanted.
> 
> Also I am not so happy with the structure of PropertyUtils as is is now. 
> E.g. the method getPropertyDescriptors(Object bean) should not be
> public if dynamic properties are allowed, since we cannot retrieve
> a complete list of all properties and so it will only return the 
> standard and integer indexed properties, with a bit of effort it could
> return the string keyed ones, but I've no idea, how it could return the
> list of dynamic ones.
> 

In order for BeanUtils.populate() to work according to it's Javadocs, it
needs to have a way to ask for the list of valid properties that are
supported by the bean.  This functionality is absolutely critical in
Struts (it's how request parameters get copied into an ActionForm
bean).  IMHO, any implementation of dynamic properties needs to support a
way that the valid properties can be enumerated.

> --
> gR
> 

Craig McClanahan

Reply via email to