On Wed, 17 Feb 2010 14:47:10 -0200, Stephan Windmüller <stephan.windmuel...@cs.tu-dortmund.de> wrote:

Angelo Chen wrote:

Using following code to update an object:
     < t:beaneditform t:id="user" submitlabel="message:create-user"  />
but when click 'update', got following error:

Could not find a coercion from type java.util.Date to type
java.sql.Timestamp.

Timestamp is a Date subclass. Tapestry provides a view and edit blocks for Date, so BeanEditForm knows how to handle it, but there's no out-of-the-box coercion from Timestamp to Date. Just add one and it will work. By the way, you shouldn't use Timestamp in an entity class field: java.util.Date should be used in this case. Timestamp is just the Java counterpart of the timestamp SQL type.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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

Reply via email to