Hello,
I am very new to Wicket
I am building an application that requires a Datetimefield
The field in my database 'timein' is datetime.
The pojo object accepts a java.sql.Timestamp
/**
* Returns the value of the codetimein/code property.
*
*/
@Column(name = timein )
public
DateTimeField internally uses a DateTextField which is a normal
TextField initialized as type java.util.Date
You could create a class:
public class TimestampField extends DateTimeField {
protected DateTextField newDateTextField(String id, PropertyModel
dateFieldModel)
{
return
You can create a custom converter.
A simpler quick solution is to create two methods to encapsulate the sql
date in a normal date:
The pojo object accepts a java.sql.Timestamp
Your original methods:
[CODE]
@Column(name = timein )
public java.sql.Timestamp getTimein() {
return timein;
hello @matt
I carried out your instruction i still got the same error
WicketMessage: Error calling method: public void
org.apache.wicket.extensions.yui.calendar.DateTimeField.setDate(java.util.Date)
on object: [MarkupContainer [Component id = timein]]
Root cause:
thanks a lot
I resolved it by add those getter and setters
I would consider that a hack anyway but there still needs to be a
simpler more streamlined way of achieving the same thing using the
converters.
Thanks again.
On Thu, Dec 17, 2009 at 3:32 PM, chinedu efoagui chinedub...@gmail.com wrote:
I use that continuously. Not only in Wicket but with swing too. It's a kind
of hack but it does its job.
The economic way is to use a converter because in the future you may use the
converter with other model classes. In the other hand if you use the same
model with different technologies (Swing,