So I am trying to replace what was a text field to get time from my users with a TimeField (of the type mentioned in the title).
I am running into all kinds of problems. Namely, that the TimeField, absolutely must be Timefield type, and doesn't easily convert to a java.util.Date or even a string??? Very frustatring. At any, case, I keep getting
Caused by: java.lang.ClassCastException: com.usaa.infrastructure.calculator.admin.panels.SloDefinitionEditPanel$21 incompatible with java.util.Date
at org.apache.wicket.extensions.yui.calendar.DateTimeField.onBeforeRender(DateTimeField.java:429)
So basically, this is what I have in my panel:
private TimeField dueTimestamp = null;
I set up the standartd Timefield class as well...
randoTimestamp = new TimeField("randoTimestamp", new PropertyModel<Date>(this, "randoTimestamp"))
{
private static final long serialVersionUID = 1L;
@Override
public boolean isEnabled()
{
return readOnly ? false : true;
}
@Override
protected boolean use12HourFormat(){
return false;
}
};
Is there an override or something I can use to help mitigate this java.util.date issue? Almost forgot to mention, I set my DAO object as a java.util.Date object. Should I set it equal to something else? String, ect???
public class wackyVO implements Serializable {
private static final long serialVersionUID = -2592713376857273204L;
...
private Date randoTimeStamp; //<-- This variable
...
}