MyFaces Core
  1. MyFaces Core
  2. MYFACES-54

Attribute locale of type String not supported in convertNumber

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.7 beta
    • Fix Version/s: 1.1.0
    • Component/s: General
    • Labels:
      None
    • Environment:
      JBoss 4, Tomcat 5, JDK 1.5, Win XP

      Description

      When I set the value of locale (convertNumber) to "pt_BR" it throws this below message. From my point of view all attributes of type String must be supported at all components (TAG).

      java.lang.IllegalArgumentException: Attribute locale of type String not supported
      at net.sourceforge.myfaces.taglib.core.ConvertNumberTag.setConverterLocale(ConvertNumberTag.java:224)
      at net.sourceforge.myfaces.taglib.core.ConvertNumberTag.createConverter(ConvertNumberTag.java:128)
      at javax.faces.webapp.ConverterTag.doStartTag(ConverterTag.java:60)
      at org.apache.jsp.test_jsp._jspx_meth_f_convertNumber_0(test_jsp.java:223)
      at org.apache.jsp.test_jsp._jspx_meth_h_inputText_0(test_jsp.java:197)
      at org.apache.jsp.test_jsp._jspx_meth_h_form_0(test_jsp.java:150)
      at org.apache.jsp.test_jsp._jspx_meth_f_view_0(test_jsp.java:116)
      at org.apache.jsp.test_jsp._jspService(test_jsp.java:72)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

      1. myfaces-54.patch
        0.7 kB
        Pino Silvaggio

        Activity

        Darlan Oliveira created issue -
        Hide
        Pino Silvaggio added a comment -

        I would have assumed that String was accepted
        but the specification does not specify String
        as valid type for the locale.

        Weird, considering for example convertDateTime
        which the spec for locale does accept String.

        Show
        Pino Silvaggio added a comment - I would have assumed that String was accepted but the specification does not specify String as valid type for the locale. Weird, considering for example convertDateTime which the spec for locale does accept String.
        Hide
        Pino Silvaggio added a comment -

        I just double checked this, the spec is really messed up.
        In the tag attribute description no mention of
        String type for locale is mentioned but
        in the spec document changes it says:
        The "locale" attribute for <f:convertDateTime> and <f:convertNumber> in 9.4.3
        and 9.4.4 is described to only accept a Locale instance, but must also accepts a
        String.

        Show
        Pino Silvaggio added a comment - I just double checked this, the spec is really messed up. In the tag attribute description no mention of String type for locale is mentioned but in the spec document changes it says: The "locale" attribute for <f:convertDateTime> and <f:convertNumber> in 9.4.3 and 9.4.4 is described to only accept a Locale instance, but must also accepts a String.
        Pino Silvaggio made changes -
        Field Original Value New Value
        Attachment myfaces-54.patch [ 20199 ]
        sean schofield made changes -
        Component/s JSF 1.1 [ 12310165 ]
        Description When I set the value of locale (convertNumber) to "pt_BR" it throws this below message. From my point of view all attributes of type String must be supported at all components (TAG).


        java.lang.IllegalArgumentException: Attribute locale of type String not supported
        at net.sourceforge.myfaces.taglib.core.ConvertNumberTag.setConverterLocale(ConvertNumberTag.java:224)
        at net.sourceforge.myfaces.taglib.core.ConvertNumberTag.createConverter(ConvertNumberTag.java:128)
        at javax.faces.webapp.ConverterTag.doStartTag(ConverterTag.java:60)
        at org.apache.jsp.test_jsp._jspx_meth_f_convertNumber_0(test_jsp.java:223)
        at org.apache.jsp.test_jsp._jspx_meth_h_inputText_0(test_jsp.java:197)
        at org.apache.jsp.test_jsp._jspx_meth_h_form_0(test_jsp.java:150)
        at org.apache.jsp.test_jsp._jspx_meth_f_view_0(test_jsp.java:116)
        at org.apache.jsp.test_jsp._jspService(test_jsp.java:72)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        When I set the value of locale (convertNumber) to "pt_BR" it throws this below message. From my point of view all attributes of type String must be supported at all components (TAG).


        java.lang.IllegalArgumentException: Attribute locale of type String not supported
        at net.sourceforge.myfaces.taglib.core.ConvertNumberTag.setConverterLocale(ConvertNumberTag.java:224)
        at net.sourceforge.myfaces.taglib.core.ConvertNumberTag.createConverter(ConvertNumberTag.java:128)
        at javax.faces.webapp.ConverterTag.doStartTag(ConverterTag.java:60)
        at org.apache.jsp.test_jsp._jspx_meth_f_convertNumber_0(test_jsp.java:223)
        at org.apache.jsp.test_jsp._jspx_meth_h_inputText_0(test_jsp.java:197)
        at org.apache.jsp.test_jsp._jspx_meth_h_form_0(test_jsp.java:150)
        at org.apache.jsp.test_jsp._jspx_meth_f_view_0(test_jsp.java:116)
        at org.apache.jsp.test_jsp._jspService(test_jsp.java:72)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        Hide
        Martin Marinschek added a comment -

        Locales can now also be specified by using strings

        Show
        Martin Marinschek added a comment - Locales can now also be specified by using strings
        Martin Marinschek made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Assignee Martin Marinschek [ mmarinschek ]
        Fix Version/s Nightly Build [ 11074 ]
        sean schofield made changes -
        Workflow jira [ 38993 ] MyFaces Workflow [ 12347884 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12347884 ] MyFaces Workflow2 [ 12349768 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12347884 ] MyFaces Workflow2 [ 12349804 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12347884 ] MyFaces Workflow2 [ 12349897 ]
        sean schofield made changes -
        Workflow MyFaces Workflow2 [ 12349897 ] MyFaces Workflow [ 12354033 ]
        sean schofield made changes -
        Workflow MyFaces Workflow [ 12354033 ] MyFaces Workflow2 [ 12355555 ]
        sean schofield made changes -
        Workflow MyFaces Workflow2 [ 12355555 ]  MyFaces Workflow [ 12357261 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12357261 ] MyFaces Workflow2 [ 12358262 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12358262 ] MyFaces Workflow2 [ 12358751 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12358751 ] MyFaces Workflow2 [ 12359352 ]
        sean schofield made changes -
        Workflow  MyFaces Workflow [ 12359352 ] MyFaces Workflow2 [ 12359941 ]

          People

          • Assignee:
            Martin Marinschek
            Reporter:
            Darlan Oliveira
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development