Hi,

shouldn't the TextField, when you add a TypeValidator of type Date to it, check if the entered date is valid?
I can enter the 31st of February, or even the 32nd.

And I have to set the Locale for the whole session in order for it to accept the German date format. When I only pass a new Locale object to the constructor of TypeValidator it doesn't work.

This is the code:

Locale locale_de = new Locale("de", "DE");

getSession().setLocale(locale_de);
add(new TextField("birthdate", new PropertyModel(person, "birthdate"), Date.class).add(new TypeValidator(Date.class, locale_de)));

- Johannes


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to