Hello, i have a problem with the spring's server side validation.
I have a form that submit some date field formated as dd/MM/yyy HH:mm:ss.
When i submit the form i get this error:
Failed to convert property value of type [java.lang.String] to required type 
[java.sql.Timestamp] for property dataIns

where dataIns is my date field.
In the Model i have:
private Timestamp dataIns
with its own get and set, and in the baseFormController
i registered a new binder

        if(("").equals(this.timestampFormat)){
         this.timestampFormat = getText("timestamp.format", 
request.getLocale());
        }
        SimpleDateFormat timestampSimpleDateFormat = new 
SimpleDateFormat(timestampFormat);
        timestampSimpleDateFormat.setLenient(false);
        binder.registerCustomEditor(Timestamp.class, null, new 
CustomDateEditor(timestampSimpleDateFormat, true));

where timestamp.format=dd/MM/yyyy HH:mm:ss

So, what's the problem?

Thanks in advance

-- 
andrea cossu 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to