ssljivic
Jul 15th, 2007, 09:59 AM
I have a problem creating the form with field bound to java.util.Date.
When the form is submitted with blank date filed, the following error is shown:
Property 'dateTo' threw exception; nested exception is java.lang.IllegalArgumentException: The date must not be null
I am using the CustomDateEditor. I have the following initBinder implemented:
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception
{
super.initBinder(request, binder);
binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true));
}
CustomDateEditor is configured to accept the empty values.
I am using the Spring’s form tags.
Can anyone help with this?
Thanks
When the form is submitted with blank date filed, the following error is shown:
Property 'dateTo' threw exception; nested exception is java.lang.IllegalArgumentException: The date must not be null
I am using the CustomDateEditor. I have the following initBinder implemented:
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception
{
super.initBinder(request, binder);
binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true));
}
CustomDateEditor is configured to accept the empty values.
I am using the Spring’s form tags.
Can anyone help with this?
Thanks