hi Richard

i'm not sure whether it's a bug or not - i'd need more detailed example code.

there is one thing that it might be - if you pass in "dd/MM/yyyy" into the IntegerLocaleConverter constructor - for example:

new IntegerLocaleConverter( Locale.getDefault(), "dd/MM/yyyy")

then you might get something similar to what you describe.

- robert

On Sunday, January 26, 2003, at 02:49 PM, Richard Lamuette wrote:

yes, and it doesn't change the problem. Is there something I misunderstand ?
Or is it a bug ?
Need Help.
Thank you.
Richard.

-----Message d'origine-----
De : robert burrell donkin [mailto:[EMAIL PROTECTED]]
Envoye : samedi 25 janvier 2003 21:23
A : Jakarta Commons Users List
Objet : Re: [BeanUtils] Registering converters. Help!!


hi Richard

are you registering a converter (IntegerLocaleConverter, say) to perform
the string-to-integer conversion?

- robert

On Saturday, January 25, 2003, at 02:01 PM, Richard Lamuette wrote:

BeanUtils v1.6 in Stuts 1.1b3
When trying to resolve the problem of populating form bean or business
bean
with date types, I use :
   ConvertUtils.register ( new SqlDateLocaleConverter( Locale.getDefault(
),
"dd/MM/yyyy") , java.sql.Date.class);
   ConvertUtils.register ( new StringLocaleConverter(
Locale.getDefault(),"dd/MM/yyyy") , String.class);

eveything works great by using BeansUtil.copyProperties(form,business)
* in my form bean, String type for my date
* in my business bean, java.sql.Date type for my date

But the problems appear when I add another property to my form and my
business bean,
* in my form bean, String type for my integer
* in my business bean, Integer type for my integer

BeanUtils copy in the string property of my form bean :
dd/MM/yyyyMYINTEGER
Actually, it uses the same pattern "dd/MM/yyyy" for converting Integer to
String than for converting Date to String.
The problem is obviously there in the management of the different sources
of
pattern in the Converters, the pattern is not related to the source type
of
the conversion. Am I right ?
Thank you for your support.
Richard.


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


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


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


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

Reply via email to