Hi Charles

About Question 1: The validation message seems to have its origin in FormComponent#convertInput(): It will try either "IConverter.<date class simple name>" or "IConverter" and the used pattern will be available as the variable "format" (or ${format} as used in the string resources).

About Question 2: You'll have to subclass the DateTextField and override getConverter().

You could then just check if the returned super.getConverter() is of type DateConverter and if yes, call the setLenient() method on it.

Matt

Charles Moulliard wrote:
I use a DateTextField to check if a user encode date according to the
Date pattern format defined.

DateTextField textfieldFromDate = new DateTextField("fromDate", "yyyyMMdd" );

Question 1 : Is it possible in the message displayed by Wicket after
the validation in the feedbackPanel to show the correct format to be
used ?

Question 2 . Can we define the format to be used (in the case of a
date) as setLenient() to verify if the date encoded is correct unlike
as the following date "20090230" ?

Regards,

Charles Moulliard

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to