2 Replies Latest reply on Nov 30, 2012 11:17 PM by daguirre1983

    Error when filter table using decimal values in Locale = es

    daguirre1983
      Hi

      This is my problem:
      http://adfbugs.blogspot.com/2011/06/table-filter-number-format-bug.html

      i have this in my faces-config:

      <locale-config>
      <default-locale>es_CO</default-locale>
      </locale-config>


      Someone help me please??
        • 1. Re: Error when filter table using decimal values in Locale = es
          Alejandro Profet
          Hi,

          You can define the decimal separator in your ADF application by putting something like this in your trinidad-config-xml:
          <decimal-separator>#{UserPreferences.language=='es' ? ',' : '.'}</decimal-separator>
          See this Biemond's article: http://biemond.blogspot.com.es/2009/02/change-language-locale-in-adf.html

          And check the documentation for trinidad-config.xml: http://docs.oracle.com/cd/E15051_01/web.1111/b31973/af_global.htm#BJECDDDE
          <decimal-separator>: Defines the separator used for the decimal point (for example, a period or a comma). ADF Faces automatically derives the separator from the current locale, but you can override this default by specifying a value in this element. If set, this value is used by oracle.adf.view.faces.converter.NumberConverter while it parses and formats.
          AP
          • 2. Re: Error when filter table using decimal values in Locale = es
            daguirre1983
            Using debug i check query is executing after filter :

            SELECT * FROM (select * from XXXXXX) QRSLT WHERE ( ( (C_1 = :vc_temp_1 ) ) )

            SQL is good but when i check the value of: vc_temp_1 variable i find the problem: the object is type String and also value is 1.5.

            That is the problem why is String type?? In the filter i am using converter like this:

            <f:facet name="filter">
            <af:inputText id="it3" value="#{vs.filterCriteria.C1}" converter="javax.faces.Number"/>
            </f:facet>


            think its an error bug... for spanish people.

            NOTE: In spanish decimal separator is , and miles separator is . When i set Locale in faces-config, Number use that configuration. Think that is not the problem here.