You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chen, Dean (Zhun)" <De...@gs.com> on 2002/06/07 16:52:48 UTC
SqlTimeConverter usage
Anyone have succesfully used SqlTimeConverter?
I'm having trouble using it. The API didn't seem up-to-date, so I looked at
the source.
I tried,
SqlTimeConverter stc = new SqlTimeConverter(null);
fromDate = stc.convert(java.sql.Time.class, fromDate);
But that doesn't work, I get incompatible types error. Thanks in advance,
Dean Chen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: SqlTimeConverter usage
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Fri, 7 Jun 2002, Chen, Dean (Zhun) wrote:
> Date: Fri, 7 Jun 2002 10:52:48 -0400
> From: "Chen, Dean (Zhun)" <De...@gs.com>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: 'Struts Users Mailing List' <st...@jakarta.apache.org>
> Subject: SqlTimeConverter usage
>
> Anyone have succesfully used SqlTimeConverter?
>
> I'm having trouble using it. The API didn't seem up-to-date, so I looked at
> the source.
>
> I tried,
>
> SqlTimeConverter stc = new SqlTimeConverter(null);
> fromDate = stc.convert(java.sql.Time.class, fromDate);
>
> But that doesn't work, I get incompatible types error. Thanks in advance,
>
The default Converter implementations only do String-->Foo conversions
(for a class Foo), because that's the sort of thing that is needed to
process request parameters. Doing arbitrary Bar-->Foo conversions would
require writing your own Converter (or extending the standard one with
this additional capability).
> Dean Chen
>
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>