Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-24285

BindingUtils behavior is incorrect for locales that have comma (,) as decimal separator

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: Adobe Flex SDK 4.0 (Release)
    • Fix Version/s: None
    • Component/s: Data Binding
    • Labels:
      None
    • Environment:
      Affected OS(s): Windows
      Affected OS(s): Windows XP
      Language Found: Russian

      Description

      Steps to reproduce:
      1. Use Number field as model

      2. Create simple form, that has a TextInput binded to model in following fashion:

      BindingUtils.bindProperty(listPriceTextInput, "text", _skuPrice, "regularPrice");
      BindingUtils.bindProperty(_skuPrice, "regularPrice", listPriceTextInput, "text");

      3. Add a NumberValidator
      <mx:NumberValidator id="listPriceValidator" source="

      {listPriceTextInput}

      " property="text"
      allowNegative="false"/>
      4. Compile with russian locale, i.e. mxmlc ant task has ru_RU locale. ru_RU locale has a comma (,) as decimal separator.

      5. Run and try to input any decimal value with comma as decimal separator.

      Actual Results:
      Inputed decimal value become a NaN. The scenario is : user input a comma decimal separator, NumberValidation validate it in correct way, but BindingUtils can not convert text with comma to Number and set NaN value to target Number field and value in TextInput became a string NaN and validator can not pass this value.

      Expected Results:

      Decimal value inputed

      Workaround (if any):

      Force use dot (.) as decimal separator in NumberValidator and desribe this in documentation.

        Attachments

          Activity

            People

            • Assignee:
              adobejira Adobe JIRA
              Reporter:
              adobejira Adobe JIRA
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: