PhoneFormatter for formatting unformatted phone digits : PhoneFormatter « Data Model « Flex






PhoneFormatter for formatting unformatted phone digits

PhoneFormatter for formatting unformatted phone digits
   
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:XML id="myData">
        <root>
            <contactlist>
                <item name="contact" phone="2016679872" />
            </contactlist>
        </root>
    </mx:XML>
    <mx:PhoneFormatter id="fmtNumber" formatString="(###) ###-####" />
    <mx:Label
        text="Contact Phone: {fmtNumber.format(myData.contactlist.item.@phone)}" />
</mx:Application>

   
    
    
  








Related examples in the same category

1.Using declared PhoneFormatter defined in mxmlUsing declared PhoneFormatter defined in mxml
2.Using ActionScript to format based on data lengthUsing ActionScript to format based on data length
3.Create an instance of a PhoneFormatter using ActionScriptCreate an instance of a PhoneFormatter using ActionScript
4.Set format string for PhoneFormatterSet format string for PhoneFormatter
5.Set validPatternChars for PhoneFormatterSet validPatternChars for PhoneFormatter
6.Add area code for PhoneFormatterAdd area code for PhoneFormatter
7.Set area code format for PhoneFormatterSet area code format for PhoneFormatter
8.Using the PhoneFormatter classUsing the PhoneFormatter class
9.PhoneFormatter and formatting parametersPhoneFormatter and formatting parameters
10.Use error property to check if a problem occurred during formattingUse error property to check if a problem occurred during formatting