--- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
>
>
> Version (a) is very close to my favorite approach --
> create an extension
> of the BeanInfo concept in JavaBeans.  Since you
> control the
> implementation of the BeanInfo class, you can decide
> how the list of
> properties is created (and it can change dynamically
> based on
> circumstances for a particular bean).  Further, this
> fits in to what
> BeanUtils is already using for introspection, so
> it's a much less painful
> change.

I understand you as saying that the getPropertyDescriptors (in the BeanInfo
class) should also return the dynamic properties, correct? I think that
might cause problems for other applications that rely on only getting
"standard" and indexed properties. For this reason I would prefer to keep
the dynamic (and also the mapped) properties out of the BeanInfo.

I do think that getPropertyDescriptors in PropertyUtils should return the
dynamic properties. Of course the dynamic properties can't be cached, but
the other properties will still be cached. (IMHO this should also be the
case for mapped properties)

I would prefer that a bean with dynamic properties implement an interface
DynamicPropertyBean with only one method. The method returns a list of the
currently valid dynamic properties (instances of DynamicPropertyDescriptor).

Comments?

I have currently something running like this, and would be happy to
integrate it into the lastest code (with test cases). I have already talked
with Gregor Rayman about this, and I also believe it will work nicely
together with mapped properties.

- Jan Sorensen
aragost




Reply via email to