Why doesn't the PropertyUtils.describe method use the DynaBean introspection method you described below to copy properties from Dynabean to a HashMap. Looking at the code it seems like populate method accounts for DynaBeans.
Sanjay -----Original Message----- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 12:07 PM To: Struts Users Mailing List Subject: Re: PropertyUtils.describe and DynaBeans On Fri, 7 Jun 2002, Sharma, Sanjay (LNG) wrote: > Date: Fri, 7 Jun 2002 11:51:27 -0400 > From: "Sharma, Sanjay (LNG)" <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]> > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: PropertyUtils.describe and DynaBeans > > > I would like to use the describe method to populate a hash map from a Dyna > bean. This method uses getPropertyDescriptors which javadoc & release notes > state don't work with DynaBeans. What is the time frame (if any) for making > getPropertyDescriptor methods work with DynaBeans. > There are some pretty significant challenges in getting this to work -- in particular, a PropertyDescriptor wants to include a Method for the property getter and setter methods, but the signatures won't match the JavaBeans design patterns. An alternative way to introspect a DynaBean is like this: DynaBean myDynaBean = ...; DynaClass myDynaClass = myDynaBean.getDynaClass(); DynaProperty myDynaProps[] = myDynaClass.getDynaProperties(); Each dynamic property has a small descriptor that includes the name and type of the underlying property. This will work on any correctly coded DynaBean implementation (including, for example, DynaActionForm). > Thanks, > > Sanjay Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>