I had the same problem, i.e., the class that I wanted to un/marshall had a field of type java.util.Date.

I've done it like this:
- Imagine that you have a field called birthDate (getter='getBirthDate', setter='setBirthDate'), of type java.util.Date
- I created two methods "String getBirthDateAsString()" and "void setBirthDateFromString(String date)" that are used in the mapping file (see <field> tag attributes "set-method" and "get-method"), but that internally use the java.util.Date field.
- To convert between String and Date I used the DateFormat class.


Regards,

Renato

Munuswamy-Ramu Senthilkumar wrote:

Hi,

Thanks lot.

But if i use the type java.util.Date.

Any idea how to solve it.

Because i cann't change the type.

if i want to change the type from java.util.Date into String , the impact
on code change is more.



thanks & regards,
senthil






Renato Torres <[EMAIL PROTECTED]> 04.02.2004 18:20


To: Munuswamy-Ramu Senthilkumar/ext/[EMAIL PROTECTED] cc: Subject: Re: [castor-dev] java.util.Date: unmarshall problem


Hi. Check this <http://hypermail.linklord.com/castor-dev/2003/Nov/1731.html> thread for the solution that I used.

Regards,

Renato

Munuswamy-Ramu Senthilkumar wrote:

Hi renato,


I am facing same problem.


Do you any idea to solve it?

Let me know.


Thanks & Regards, senthil









----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to