Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current, 2.0.4, 2.1.1
    • Fix Version/s: 2.1.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Mojarra (tested with versions 2.0.4 and 2.1.1), tomcat 6.0, windows

      Description

      Here is a simple example of date input text with <f:convertDateTime/> :

       
      <h:inputText id="dateOfBirth" value="#{user.dateOfBirth}" 
          size="20" required="true" label="Date of Birth">
          <f:convertDateTime />
      </h:inputText>
      <h:message for="dateOfBirth" style="color:red" />
      

      When we execute this with an error in date conversion (ex : xxxxx) in the inputText field, the error message displayed in <h:message> with locale FR contains the token '

      {1}

      ' which means that a parameter is not interpreted :

      Date of Birth : 'xxxxx' na pas pu être interprété en tant que date. Exemple : \{1\}
      

      When we switch the locale in english, there is no problem the message is correctly displayed :

      Date of Birth: 'xxxxx' could not be understood as a date. Example: Jun 1, 2011
      

      Solution : in jsf-api.jar/javax.faces.Messages_fr.properties the character ' (quote) is not escaped in many messages, so try to put a double quote like this : ''

      I've attached a sample web project that illustrates the problem

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          Please review this fix.

          Show
          Ed Burns added a comment - Please review this fix.
          Hide
          mansour added a comment -

          Thank you for the patch, it works better now but it seems that you forgot some characters ''(quotes) that are not replaced by "\u00ab" and "\u00bb"in the file JsfToolsMessages_fr.properties. For the moment, we will include the file messages_fr.properties corrected in the web application and we wait for a new version that correct this 2.0.x or 2.1.x ?

          Show
          mansour added a comment - Thank you for the patch, it works better now but it seems that you forgot some characters ''(quotes) that are not replaced by "\u00ab" and "\u00bb"in the file JsfToolsMessages_fr.properties. For the moment, we will include the file messages_fr.properties corrected in the web application and we wait for a new version that correct this 2.0.x or 2.1.x ?
          Hide
          Ed Burns added a comment -

          Committed to trunk.

          Sending jsf-api/src/main/java/javax/faces/LogStrings_fr.properties
          Sending jsf-api/src/main/java/javax/faces/Messages_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Jalopy_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Luxury_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Messages_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Resources_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/SUV_fr.properties
          Sending jsf-ri/src/main/resources/com/sun/faces/LogStrings_fr.properties
          Sending jsf-ri/src/main/resources/com/sun/faces/resources/Messages_fr.properties
          Sending jsf-tools/src/main/resources/JsfToolsMessages_fr.properties
          Transmitting file data ..........
          Committed revision 9136.

          Show
          Ed Burns added a comment - Committed to trunk. Sending jsf-api/src/main/java/javax/faces/LogStrings_fr.properties Sending jsf-api/src/main/java/javax/faces/Messages_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Jalopy_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Luxury_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Messages_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Resources_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/SUV_fr.properties Sending jsf-ri/src/main/resources/com/sun/faces/LogStrings_fr.properties Sending jsf-ri/src/main/resources/com/sun/faces/resources/Messages_fr.properties Sending jsf-tools/src/main/resources/JsfToolsMessages_fr.properties Transmitting file data .......... Committed revision 9136.
          Hide
          Ed Burns added a comment -

          Committed to 2.1 branch.

          Sending jsf-api/src/main/java/javax/faces/LogStrings_fr.properties
          Sending jsf-api/src/main/java/javax/faces/Messages_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Jalopy_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Luxury_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Messages_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Resources_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/SUV_fr.properties
          Sending jsf-ri/src/main/resources/com/sun/faces/LogStrings_fr.properties
          Sending jsf-ri/src/main/resources/com/sun/faces/resources/Messages_fr.properties
          Sending jsf-tools/src/main/resources/JsfToolsMessages_fr.properties
          Transmitting file data ..........
          Committed revision 9137.

          Show
          Ed Burns added a comment - Committed to 2.1 branch. Sending jsf-api/src/main/java/javax/faces/LogStrings_fr.properties Sending jsf-api/src/main/java/javax/faces/Messages_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Jalopy_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Luxury_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Messages_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Resources_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/SUV_fr.properties Sending jsf-ri/src/main/resources/com/sun/faces/LogStrings_fr.properties Sending jsf-ri/src/main/resources/com/sun/faces/resources/Messages_fr.properties Sending jsf-tools/src/main/resources/JsfToolsMessages_fr.properties Transmitting file data .......... Committed revision 9137.
          Hide
          Ed Burns added a comment -

          Committed to 2.0.x branch, but we've already cut 2.0.6. Therefore, it will be in 2.0.7.

          Thanks for reporting it.

          Sending jsf-api/src/main/java/javax/faces/LogStrings_fr.properties
          Sending jsf-api/src/main/java/javax/faces/Messages_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Jalopy_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Luxury_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Messages_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Resources_fr.properties
          Sending jsf-demo/archive/carstore/src/java/carstore/bundles/SUV_fr.properties
          Sending jsf-ri/src/main/resources/com/sun/faces/LogStrings_fr.properties
          Sending jsf-ri/src/main/resources/com/sun/faces/resources/Messages_fr.properties
          Sending jsf-tools/src/main/resources/JsfToolsMessages_fr.properties
          Transmitting file data ..........
          Committed revision 9138.

          Show
          Ed Burns added a comment - Committed to 2.0.x branch, but we've already cut 2.0.6. Therefore, it will be in 2.0.7. Thanks for reporting it. Sending jsf-api/src/main/java/javax/faces/LogStrings_fr.properties Sending jsf-api/src/main/java/javax/faces/Messages_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Jalopy_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Luxury_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Messages_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/Resources_fr.properties Sending jsf-demo/archive/carstore/src/java/carstore/bundles/SUV_fr.properties Sending jsf-ri/src/main/resources/com/sun/faces/LogStrings_fr.properties Sending jsf-ri/src/main/resources/com/sun/faces/resources/Messages_fr.properties Sending jsf-tools/src/main/resources/JsfToolsMessages_fr.properties Transmitting file data .......... Committed revision 9138.
          Hide
          rogerk added a comment -

          fix version

          Show
          rogerk added a comment - fix version
          Hide
          rogerk added a comment -

          fix version

          Show
          rogerk added a comment - fix version
          Hide
          rogerk added a comment -

          fix version

          Show
          rogerk added a comment - fix version

            People

            • Assignee:
              Ed Burns
              Reporter:
              mansour
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m