You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Goran Novak <gn...@gmail.com> on 2008/10/20 16:40:04 UTC
DateTextField, format not valid, message key
Hi,
I'm using the org.apache.wicket.datetime.markup.html.form.DateTextField
component for my date fields.
When I enter some random string in the text field in the feedback panel,
"'asdfasdf' is not a valid Date." message appears.
I would like to customize that message, but I can't find which key I need to
insert in the properties file.
SomePage.properties -->
...
dateTextField.<NameOfValidator> = The date is not valid custom message.
...
<--
Does somebody know what do I need to insert instead of the <NameOfValidator>
string.
I searched the javadoc for the component and the web but didn't find the
validator name.
The component is defined as follows in the java file:
SomePage.java -->
...
DateTextField dateTextField= new DateTextField("dateTextField", new
PropertyModel(model, "propertyName"), new
PatternDateConverter("dd.MM.yyyy",true));
dateTextField.add(new DatePicker());
add(dateTextField);
...
<--
Thanks,
Goran
--
View this message in context: http://www.nabble.com/DateTextField%2C-format-not-valid%2C-message-key-tp20069519p20069519.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: DateTextField, format not valid, message key
Posted by Goran Novak <gn...@gmail.com>.
It works, thanks :)
dateTextField.IConverter.Date = The date is not valid custom message
Serkan Camurcuoglu wrote:
>
> Wicket in Action book says that IConverter.Date should work..
>
> ***
>
>
--
View this message in context: http://www.nabble.com/DateTextField%2C-format-not-valid%2C-message-key-tp20069519p20085182.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: DateTextField, format not valid, message key
Posted by Serkan Camurcuoglu <se...@telenity.com>.
Wicket in Action book says that IConverter.Date should work..
Serkan Camurcuoglu wrote:
>
> grepping the wicket source I found in file
> src/jdk-1.4/wicket/src/main/java/org/apache/wicket/Application.properties:
>
> IConverter='${input}' is not a valid ${type}.
>
> but I don't know if you can specify a separate message for type Date..
>
>
>
>
>
> Goran Novak wrote:
>>
>> Hi,
>>
>> I'm using the org.apache.wicket.datetime.markup.html.form.DateTextField
>> component for my date fields.
>>
>> When I enter some random string in the text field in the feedback panel,
>> "'asdfasdf' is not a valid Date." message appears.
>>
>> I would like to customize that message, but I can't find which key I need
>> to insert in the properties file.
>>
>> SomePage.properties -->
>> ...
>> dateTextField.<NameOfValidator> = The date is not valid custom message.
>> ...
>> <--
>>
>> Does somebody know what do I need to insert instead of the
>> <NameOfValidator> string.
>>
>> I searched the javadoc for the component and the web but didn't find the
>> validator name.
>>
>> The component is defined as follows in the java file:
>>
>> SomePage.java -->
>> ...
>> DateTextField dateTextField= new DateTextField("dateTextField", new
>> PropertyModel(model, "propertyName"), new
>> PatternDateConverter("dd.MM.yyyy",true));
>>
>> dateTextField.add(new DatePicker());
>> add(dateTextField);
>> ...
>> <--
>>
>> Thanks,
>> Goran
>>
>>
>
>
--
View this message in context: http://www.nabble.com/DateTextField%2C-format-not-valid%2C-message-key-tp20069519p20071867.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: DateTextField, format not valid, message key
Posted by Serkan Camurcuoglu <se...@telenity.com>.
grepping the wicket source I found in file
src/jdk-1.4/wicket/src/main/java/org/apache/wicket/Application.properties:
IConverter='${input}' is not a valid ${type}.
but I don't know if you can specify a separate message for type Date..
Goran Novak wrote:
>
> Hi,
>
> I'm using the org.apache.wicket.datetime.markup.html.form.DateTextField
> component for my date fields.
>
> When I enter some random string in the text field in the feedback panel,
> "'asdfasdf' is not a valid Date." message appears.
>
> I would like to customize that message, but I can't find which key I need
> to insert in the properties file.
>
> SomePage.properties -->
> ...
> dateTextField.<NameOfValidator> = The date is not valid custom message.
> ...
> <--
>
> Does somebody know what do I need to insert instead of the
> <NameOfValidator> string.
>
> I searched the javadoc for the component and the web but didn't find the
> validator name.
>
> The component is defined as follows in the java file:
>
> SomePage.java -->
> ...
> DateTextField dateTextField= new DateTextField("dateTextField", new
> PropertyModel(model, "propertyName"), new
> PatternDateConverter("dd.MM.yyyy",true));
>
> dateTextField.add(new DatePicker());
> add(dateTextField);
> ...
> <--
>
> Thanks,
> Goran
>
>
--
View this message in context: http://www.nabble.com/DateTextField%2C-format-not-valid%2C-message-key-tp20069519p20071815.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org