You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mick Knutson <mi...@hotmail.com> on 2003/05/31 18:24:42 UTC

Replacing a String with a Date in a DynaForm?

I am trying to take a String version of a date OUT of my DynaForm, convert 
it to a Date (which I can do successfully thusfar), and stick it back into 
the DynaForm, so I can copy all the properties into my ValueObject...

When I load the Form initially, I get this:
"Cannot assign value of type 'java.util.Date' to property 'startingDate' of 
type 'java.lang.String'

How can I do this?


---
Thanks...
Mick Knutson
---

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Replacing a String with a Date in a DynaForm?

Posted by Rick Reumann <r...@reumann.net>.
On Sat, May 31,'03 (09:24 AM GMT-0700), Mick wrote: 

> I am trying to take a String version of a date OUT of my DynaForm,
> convert it to a Date (which I can do successfully thusfar), and stick
> it back into the DynaForm, so I can copy all the properties into my
> ValueObject...
> 
> When I load the Form initially, I get this:
> "Cannot assign value of type 'java.util.Date' to property
> 'startingDate' of type 'java.lang.String'
> 
> How can I do this?

Search the archives about "converting java.util.date" - I remember
posting way back on how to deal with this. Not trying to not answer you
at the moment, it's just that involved registering a converter to bean
utils... not too difficult but in the post somewhere I pasted in all the
code etc. If you end up not finding it in the archives (search on
java.util.Date) just e-mail me and post to the list and I'll be happy to
tell you what I've done.

-- 
Rick


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org