I have DTO (transfering the data from my EJB) with the following fields:

    id (java.lang.Integer),
    name (java.lang.String),
    birth (java.sql.Date)

also I have a ActionForm bean with the same fields but of String types:

    id (java.lang.String),
    name (java.lang.String),
    birth (java.lang.String)

my web application implements I18N and deals with German and English locales so when 
user must insert a date in HTML form german user inserts the date into String field of 
ActionForm bean in "dd.mm.yyyy" format (according to DateFormat (MEDIUM) of "de" 
locale) and english user inserts the date in "mm/dd/yyyy" format (according to 
DateFormat (MEDIUM) of "en" locale).

To transfer all data fields from FORM into DTO where I do not have date field I can 
use:

    BeanUtils.copyProperties(myDto,myActionForm)

Now I'd like to have the similar functionlity where I will be able to have 
java.sql.Date field in my DTO object providing BeanUtils with particular DateFormat of 
current Locale. Is there anything like that? E.g. 
LocaleBeanUtils(myDto,myActionForm,dateFormat)?

Stjepan Brbot


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

Reply via email to