You might want to use a debugger and step through your code to make
sure your PropertyEditor is getting fired.

Matt

On 2/1/07, andrea cossu <[EMAIL PROTECTED]> wrote:
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]




--
http://raibledesigns.com

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

Reply via email to