myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Weßendorf (JIRA) <>
Subject [jira] Created: (TRINIDAD-1524) i18n issue with (German) format pattern
Date Thu, 02 Jul 2009 08:54:47 GMT
i18n issue with (German) format pattern

                 Key: TRINIDAD-1524
             Project: MyFaces Trinidad
          Issue Type: Bug
    Affects Versions:  1.2.11-core
            Reporter: Matthias Weßendorf
            Assignee: Matthias Weßendorf

This is not only a bug in Trinidad... It is mainly an issue in the core date_time_converter
as well:

         <h:inputText value="#{}" immediate="true">
           <f:convertDateTime type="both" timeStyle="full"
           pattern="dd.MM.yyyy HH:mm' Uhr '"
         <h:commandButton value="Submit" type="submit"/>

Note that the pattern is like this: dd.MM.yyyy HH:mm' Uhr '
After the word "Uhr" there is an empty space (required by the pattern).

Now when you enter this String "30.06.09 12:11 Uhr " (notice the empty String at the end),
we run into the problem, that the spec wants the converter to trim leading/trailing whitespaces
before proceeding. Makes sense....
but gives us a (neat) error.

See this JavaDoc section:

If the specified String is null, return a null. Otherwise, trim leading and trailing whitespace
before proceeding.

However, when the pattern requires an empty space at the end, we (the converter) should honor

possible change in the converter code (after the trim() has been called):
    if(pattern.endsWith(" '"))
      value += " ";

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message