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

[Localization]:[HS:ALL]If don't set value for "precision" parameter like "precision="2"" or remove this parameter, we can not get any result.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK 4.0 (Release)
    • Adobe Flex SDK Previous
    • Formatters
    • None
    • Affected OS(s): Windows
      Language Found: Chinese, Simplified

    Description

      Steps to reproduce:
      ----------------------------------------------------------------------------------------------------------

      <?xml version="1.0" encoding="utf-8"?>

      <!-- Simple example to demonstrate the CurrencyFormatter. -->

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

      <mx:Script>

      <![CDATA[

      import mx.events.ValidationResultEvent;

      private var vResult:ValidationResultEvent;

      // Event handler to validate and format input.

      private function Format():void {

      vResult = numVal.validate();

      if (vResult.type==ValidationResultEvent.VALID)

      { var temp:Number=Number(priceCN.text); formattedUSPrice.text= usdFormatter.format(temp); }

      else

      { formattedUSPrice.text=""; }

      }

      ]]
      >

      </mx:Script>

      <mx:CurrencyFormatter id="usdFormatter" precision="2"

      currencySymbol="¥" decimalSeparatorFrom="."

      decimalSeparatorTo="." useNegativeSign="true"

      useThousandsSeparator="true" alignSymbol="left"/>

      <mx:NumberValidator id="numVal" source="

      {priceCN}

      " property="text"

      allowNegative="true" domain="real"/>

      <mx:Panel title="CurrencyFormatter Example" width="75%" height="75%"

      paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">

      <mx:Form>

      <mx:FormItem label="Enter CN amount:">

      <mx:TextInput id="priceCN" text="" width="50%"/>

      </mx:FormItem>

      <mx:FormItem label="Formatted amount: ">

      <mx:TextInput id="formattedUSPrice" text="" width="50%" editable="false"/>

      </mx:FormItem>

      <mx:FormItem>

      <mx:Button label="Validate and Format" click="Format();"/>

      </mx:FormItem>

      </mx:Form>

      </mx:Panel>

      </mx:Application>

      --------------------------------------------------------------------------------------------------------------------------------------

      Compile the above code, the result is output correctly. But, if don't set value for "precision" parameter like "precision="2"" or remove this parameter, we can not get any result.

      Actual Results:
      If don't set value for "precision" parameter like "precision="2"" or remove this parameter, we can not get any result.

      Expected Results:
      Correct result.

      Workaround (if any):

      Notes:
      The bug also happens in Danish, Spanish, Italian, Dutch, French, Finnish, Norwegian, Portuguese, Brazilian, Swedish, Korean, ChineseSimplified and ChineseTraditional languages.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: