Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.14, 2.0.15, 2.0.16
    • Fix Version/s: None
    • Component/s: JSR-252
    • Labels:
      None

      Description

      outputFormat doesn't replace parameters if there is a simple quote [']in text.

      We have to double the quote [''] to have parameters substitution.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        3d 11h 39m 1 Leonardo Uribe 11/Dec/12 02:11
        Leonardo Uribe made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Leonardo Uribe [ lu4242 ]
        Resolution Not A Problem [ 8 ]
        Hide
        Leonardo Uribe added a comment -

        The javadoc of java.text.MessageFormat specifies the grammar of the messages. Since h:outputFormat is just a wrapper for MessageFormat, it follows the rules of that class. In conclusion everything works as expected.

        I'll close this issue as not a problem, because the reported behavior is expected according to the spec.

        Show
        Leonardo Uribe added a comment - The javadoc of java.text.MessageFormat specifies the grammar of the messages. Since h:outputFormat is just a wrapper for MessageFormat, it follows the rules of that class. In conclusion everything works as expected. I'll close this issue as not a problem, because the reported behavior is expected according to the spec.
        Karim REFEYTON made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        Karim REFEYTON made changes -
        Summary outputFormat and multi lines text property outputFormat and simple quote
        Description outputFormat doesn't replace parameters out of the first <p> or "\" of the property:
        ---cut here [myfile.properties]---
        myText=First line with parameter 0 value : {0} \
        <br/>Second line with parameter 0 value: {0}
        ---cut here---

        ---cut here [xhtml extract]---
        <h:outputFormat value="#{msg.myText}" escape="false">
          <f:param value="prm0"/>
        </h:outputFormat>
        ---cut here---

        Due to the multiline property (use of the "\" character in property value), the result is:
        ---cut here---
        First line with parameter 0 value : prm0
        Second line with parameter 0 value: {0}
        ---cut here---

        Same problem if you have:
        ---cut here [myfile.properties]---
        myText=<p>First line with parameter 0 value : {0}</p> <p>Second line with parameter 0 value: {0}</p>
        ---cut here---
        outputFormat doesn't replace parameters if there is a simple quote [']in text.

        We have to double the quote [''] to have parameters substitution.
        Karim REFEYTON made changes -
        Summary outputFormat and multiline text property outputFormat and multi lines text property
        Description outputFormat doesn't replace parameters out of the first <p/> of the property:
        ---cut here [myfile.properties]---
        myText=<p>First line with parameter 0 value : {0}</p> \
        <p>Second line with parameter 0 value: {0}</p>
        ---cut here---

        ---cut here [xhtml extract]---
        <h:outputFormat value="#{msg.myText}" escape="false">
          <f:param value="prm0"/>
        </h:outputFormat>
        ---cut here---

        Due to the multiline property (use of the "\" character in property value), the result is:
        ---cut here---
        First line with parameter 0 value : prm0
        Second line with parameter 0 value: {0}
        ---cut here---
        outputFormat doesn't replace parameters out of the first <p> or "\" of the property:
        ---cut here [myfile.properties]---
        myText=First line with parameter 0 value : {0} \
        <br/>Second line with parameter 0 value: {0}
        ---cut here---

        ---cut here [xhtml extract]---
        <h:outputFormat value="#{msg.myText}" escape="false">
          <f:param value="prm0"/>
        </h:outputFormat>
        ---cut here---

        Due to the multiline property (use of the "\" character in property value), the result is:
        ---cut here---
        First line with parameter 0 value : prm0
        Second line with parameter 0 value: {0}
        ---cut here---

        Same problem if you have:
        ---cut here [myfile.properties]---
        myText=<p>First line with parameter 0 value : {0}</p> <p>Second line with parameter 0 value: {0}</p>
        ---cut here---
        Karim REFEYTON made changes -
        Description outputFormat doesn't replace parameters out of the first line of the property:
        ---cut here [myfile.properties]---
        myText=First line with parameter 0 value : {0} \
        <br/>Second line with parameter 0 value: {0}
        ---cut here---

        ---cut here [xhtml extract]---
        <h:outputFormat value="#{msg.myText}" escape="false">
          <f:param value="prm0"/>
        </h:outputFormat>
        ---cut here---

        Due to the multiline property (use of the "\" character in property value), the result is:
        ---cut here---
        First line with parameter 0 value : prm0
        Second line with parameter 0 value: {0}
        ---cut here---
        outputFormat doesn't replace parameters out of the first <p/> of the property:
        ---cut here [myfile.properties]---
        myText=<p>First line with parameter 0 value : {0}</p> \
        <p>Second line with parameter 0 value: {0}</p>
        ---cut here---

        ---cut here [xhtml extract]---
        <h:outputFormat value="#{msg.myText}" escape="false">
          <f:param value="prm0"/>
        </h:outputFormat>
        ---cut here---

        Due to the multiline property (use of the "\" character in property value), the result is:
        ---cut here---
        First line with parameter 0 value : prm0
        Second line with parameter 0 value: {0}
        ---cut here---
        Karim REFEYTON made changes -
        Field Original Value New Value
        Affects Version/s 2.0.16 [ 12323261 ]
        Affects Version/s 2.0.15 [ 12321753 ]
        Karim REFEYTON created issue -

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Karim REFEYTON
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development