How to customize incorrect date format message for

Brief: Hard coded english message for incorrect date specified in a date filter (please see fig).

The string “Date format not recognized” originates from here:

http://https://dev.vaadin.com/svn/versions/6.5/src/com/vaadin/ui/DateField.java


private String defaultParseErrorMessage = “Date format not recognized”;

In this class there is a setter provided.

Instances of this class are created when we call:


GridCellFilter claimsFilter = new GridCellFilter(claimsGrid);
claimsFilter.setDateFilter(“createDateUI”); // get created here

We don’t have means to pass our custom error string in Russian into this DateFilter.
We use version 7.7.6 of vaadin.

What are the options here?

Thanks in advance

Hi,

maybe this part of the Book of Vaadin will help:
https://vaadin.com/docs/-/part/framework/application/application-errors.html

-Olli

Hi Olli,
thanks for your response.
I can’t apply this approach without altering the native sources. I hoped to get a new version with additional method(s) instead.
The issue is specific to a particular component vaadin-grid-util.
Just in case. I created a duplicate ticket here as well:
https://github.com/melistik/vaadin-grid-util/issues/32

Ah, you’re using some add-on, I didn’t realize that. Filing a ticket there in GitHub is probably the best way (unless you want to fix it yourself). Note that your link to http://https//dev.vaadin.com/svn/versions/6.5/src/com/vaadin/ui/DateField.java is to Vaadin 6.5, which is really old. Check
https://github.com/vaadin/framework/tree/7.7
for the version of Vaadin Framework you’re actually using.

-Olli

We use version 7.7.6 of vaadin, as I mentioned. I just used link to 6.5 because I found the needed source file here first. The string I want to reset is now in
/server/src/main/java/com/vaadin/ui/AbstractDateField.java
and it still provides a setter. So, there is nothing to be fixed on the vaadin site. It’s the add-on to be fixed. I’m OK if you close this ticket.
I posted a pull request for one of the issues in the git account of that add-on. Will see how the developers react.

setParseErrorMessage() and setDateOutOfRangeMessage()