wicketstuff - Customised Error Message for default DateValidator in Wicket -
I am using DateValidator class to validate the date entered by the user. I'm getting a general error message for this, but I can customize the error message without creating a separate validator class.
Yes, for example if you have the following type of page.
MyPage.html Then you add your Java class properties MyPage.properties You can use variables like you A good place to start is in the wiki of Apache wicket & lt; Wicket: Pages & gt; & Lt; Form wicket: id = "form" & gt; & Lt; Input type = "text" wicket: id = "start date" /> & Lt; Input type = "text" wk: id = "end date" /> & Lt; / Form & gt; & Lt; / Wicket: p. & Gt;
MyPage.properties which next to the file name to add the following entries.
form.startDate.DateValidator.minimum = & lt; Messages for the minimum STARTDATE & gt; Form.startDate.DateValidator.maximum = & lt; Messages for maximum start-up & gt; Form.endDate.DateValidator.minimum = & lt; At least message for enddate & gt; Form.endDate.DateValidator.maximum = & lt; Message for maximum enddates & gt; to be replaced
$ {input} or
$ {label} response messages for.
Comments
Post a Comment