I thought I would do a bit of research to "help out".  I may be wrong about all 
of this (because I am just an egg/noob) but here is my go at the situation.  It 
will never find the correct method "today" because PropertyUtils does not check 
the Type of the value.  In PropertyUtils the Type of the value is not passed to 
getPropertyDescriptor (line 1775), which would then do the match up on line 
890.  I am not sure that those are the only places that Type would need to be 
checked, but as I read the code from CVS, I think this is what would need to be 
fixed.

If I am wrong, please let me know.

Carl

Quoting [EMAIL PROTECTED]:

> My apologies, I left that out.  I have getPropertyDescriptors() as well.  I
> 
> tried it first, it didn't work, so I reread your initial post.  From it I 
> derived, in error, that I needed the getMethodDescriptors().  It doesn't work
> 
> either :)  So, then I tried both of them... still no dice.  
> 
> I have now tried creating the PropertyDescriptor using: 
> 
> new PropertyDescriptor(String property, Method getter, Method setter);
> 
> and I have tried to change the name of the setter and do the usual:
> 
> new PropertyDescriptor(String property, Class beanClass, String getterName,
> 
> String differentSetterName);
> 
> where:
>  public void setEmailStr(String emailAddr);
> 
> is also pointed at the email property.  Still does not work.  
> 
> I would also like to note that, yes, I could use setNestedProperty to get
> this 
> to work, but I am actually trying to do this with a Date property so nested
> 
> won't work.  The EmailForm just seemed easiest to relate to the group.
> 
> Thanks for any help...
> 
> 
> Carl
> 
> Quoting "Craig R. McClanahan" <[EMAIL PROTECTED]>:
> 
> > 
> > 
> > On Sun, 15 Dec 2002, Carl Fyffe wrote:
> > 
> > > Date: Sun, 15 Dec 2002 23:36:05 -0500
> > > From: Carl Fyffe <[EMAIL PROTECTED]>
> > > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > > To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> > > Subject: RE: [OT] Overloaded setters in JavaBeans
> > >
> > > I looked all over for an example.  I read the docs and even tried to
> > > create an example, but I can not get this to work.  I created a
> BeanInfo
> > > and defined my MethodDescriptors, here is the code:
> > >
> > 
> > You need to override the *property* descriptors, not the *method*
> > descriptors.  That is what PropertyUtils looks at.
> > 
> > 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]>
> 
> 




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to