[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: t5: BeanEditform and Timestamp
From:       "Howard Lewis Ship" <hlship () gmail ! com>
Date:       2008-02-29 20:07:52
Message-ID: ecd0e3310802291207u2fb5d02bo8949c6b08b6b3af1 () mail ! gmail ! com
[Download RAW message or body]

You'll need to supply your own data type and editor for Timestamp.   A
data type is a logial name for a Java type that is used to select an
editor Block and output Block, used by Grid, BeanDisplay,
BeanEditForm, etc.

Tapestry is treating a Timestamp like a java.util.Date, because of
inheritance ... then finding it can't really do it (the coercion
exception).

You should be able to build your own editor consisting of a DateField
plus a TextField (for the time portion) ... or building something more
complicated!

The DefaultDataTypeAnalayzer service configuration is how Tapestry
maps from property type to data type.

The BeanBlockSource service's configuration is how Tapestry maps from
data type to editor and display Block.

On Wed, Feb 27, 2008 at 10:50 PM, Angelo Chen
<angelochen960@yahoo.com.hk> wrote:
> 
> Hi,
> 
> I use BeanEditForm with an entity that has Timestamp field, it has DateField
> dialog in the page, how to encode the time? and when click 'update', I got
> this error:
> 
> Failure writing parameter value of component
> core/PropertyEditBlocks:datefield: Could not find a coercion from type
> java.util.Date to type java.sql.Timestamp.
> 
> Any idea how to use Timestamp with BeanEditForm? Thanks.
> 
> A.C.
> --
> View this message in context: \
> http://www.nabble.com/t5%3A-BeanEditform-and-Timestamp-tp15730716p15730716.html \
> Sent from the Tapestry - User mailing list archive at Nabble.com. 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic