How to get the zero of phone number eg. 0612345678

Dear Adobe Flex Builder Professionals,
I've got a problem with getting the zero of a phone number eg. 0612345678
If I enter the folowing phone number as input:
0612345678
I will get the phone number as output:
612345678
The application has been written in Adobe Flex Builder 3.
The code of the MXML file is:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init()"
horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Metadata>
  [Event(name="customerSaveEvent", type="events.CustomerEvent")]
  [Event(name="customerCancelEvent", type="flash.events.Event")]
</mx:Metadata>
<mx:Script>
  <![CDATA[
   import util.ComboBoxUtil;
   import mx.controls.Alert;
   import events.CustomerEvent;
   import mx.collections.ArrayCollection;
   import mx.core.Application;
   import valueObject.Customer;
   import mx.validators.Validator;
   import mx.validators.PhoneNumberValidator;
   private var phoneCheck:PhoneNumberValidator;
   [Bindable]
   public var selectedCustomer:Customer;
   private function init():void{
    //this.cretePhoneValidator();
    if(this.selectedCustomer == null){
     this.clearForm(null);
   private function cretePhoneValidator():void{
    phoneCheck = new PhoneNumberValidator();
    phoneCheck.source = phoneNumber;
    phoneCheck.property = "text";
   private function validateForm():void {
    //var validatorList:Array = new Array(emailCheck, phoneCheck);
    //Validator.validateAll(validatorList);
   private function cancelClickHandler():void{
    var cancelManageCustomerObj:Event = new Event("customerCancelEvent");
    dispatchEvent(cancelManageCustomerObj);
   private function saveCustomer():void {
    //validateForm();
     var c:Customer = null;
     var selCust:Customer = Application.application.selectedCustomer;
     if(selCust != null){
      c = selCust;
     } else {
      c = new Customer();          
     c.setLastName(lastName.text);
     c.setFirstName(firstName.text);
     c.setStreet(street.text);
     c.setPostal(postal.text);
     c.setCity(city.text);
     c.setEmail(email.text);
     c.setPhoneNumber(new Number(phoneNumber.text));
     c.setMailing(mailing.selectedItem.data);
     c.setComment(comment.text);
     var modified: Customer = Application.application.customerService.createOrUpdate(c);
    var customerEventObj:CustomerEvent = new CustomerEvent("customerSaveEvent", modified);
    dispatchEvent(customerEventObj);
    this.clearForm(selCust);
    private function clearForm(selCust:Customer):void{
     if(selCust == null){
      this.lastName.text = "";
      this.firstName.text = "";
      this.street.text = "";
      this.postal.text = "";
      this.city.text  = "";
      this.phoneNumber.text = "";
      this.email.text = "";
      this.mailing.selectedIndex = 0;
      this.comment.text  = "";
     focusManager.setFocus(lastName);
  ]]>
</mx:Script>
<!--mx:EmailValidator id="emailCheck" source="{email}" property="text"
  trigger="{save}" triggerEvent="click"/-->
<mx:Form id="manageCustomerForm">
  <mx:FormItem label="Achternaam:">
   <mx:TextInput id="lastName" text="{selectedCustomer.getLastName()}"/>
  </mx:FormItem>
  <mx:FormItem label="Voorletters:">
   <mx:TextInput id="firstName" text="{selectedCustomer.getFirstName()}"/>
  </mx:FormItem>
  <mx:FormItem label="Straat:">
   <mx:TextInput id="street" text="{selectedCustomer.getStreet()}"/>
  </mx:FormItem>
  <mx:FormItem label="Postcode:">
   <mx:TextInput id="postal" text="{selectedCustomer.getPostal()}"/>
  </mx:FormItem>
  <mx:FormItem label="Stad:">
   <mx:TextInput id="city" text="{selectedCustomer.getCity()}"/>
  </mx:FormItem>
  <mx:FormItem label="Telefoonnummer:">
   <mx:TextInput id="phoneNumber" text="{selectedCustomer.getPhoneNumber()}"/>
  </mx:FormItem>
  <mx:FormItem label="E-mail:">
   <mx:TextInput id="email" text="{selectedCustomer.getEmail()}"/>
  </mx:FormItem>
  <mx:FormItem label="Opmerkingen:" >
   <mx:TextArea id="comment" text="{selectedCustomer.getComment()}"
     width="447" height="144"/>
  </mx:FormItem>
  <mx:FormItem label="Mailing:">
   <mx:ComboBox id="mailing" dataProvider="{Application.application.comboBoxUtil.yesNo}"
    selectedIndex="{ComboBoxUtil.getIndex(selectedCustomer.getMailing())}"/>
  </mx:FormItem>
  <mx:HBox id="manageButtonBox">  
   <mx:Button id="save" label="Opslaan" click="saveCustomer()" />  
   <mx:Button id="resetButton" label="Wis" click="clearForm(null)" />  
   <mx:Button id="cancelButton" label="Annuleer" click="cancelClickHandler()" />
  </mx:HBox> 
</mx:Form>
</mx:Canvas>
The code of the SQL file is:
create table customer (
id integer not null primary key autoincrement,
lastName VARCHAR(50),
firstName VARCHAR(50),
street VARCHAR(50),
city VARCHAR(50),
postal VARCHAR(10),
phoneNumber INT(10),
email VARCHAR(50),
mailing boolean default false,
comment VARCHAR(255)
create table treatment (
id integer not null primary key autoincrement,
date Date,
treatment varchar(255),
customerId integer not null,
constraint fk_customer foreign key(customerId) references customer(id)
create table user (
id integer not null primary key autoincrement,
loginName varchar(50) not null,
lastName varchar(50) not null,
firstName varchar(50) not null,
password varchar(50) not null,
active boolean not null default true,
accessright varchar(10) not null
create table agenda (
id integer not null primary key autoincrement,
userId integer not null,
date Date,
hour integer,
minute integer,
description varchar(50),
constraint fk_user foreign key(userId) references user(id)
create table license (
id integer not null primary key autoincrement,
key varchar(50),
val varchar(50)
I hope someone can help me with this problem.

Customer List?
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml
initialize="init()">
<mx:Metadata>
  [Event(name="selectCustomerEvent", type="events.CustomerEvent")]
</mx:Metadata>
<mx:Script>
  <![CDATA[
   import mx.core.Application;
   import service.CustomerService;
   import events.CustomerEvent;
   import valueObject.Customer;
   import mx.events.ListEvent;
   import mx.collections.ArrayCollection;
   [Bindable]
   public var customerData:ArrayCollection;
   private var customerService:CustomerService;
   private function init():void{
    this.customerService = new CustomerService();
    this.customerData = this.customerService.getCustomers();
    if(this.customerData == null){
     this.customerData = new ArrayCollection();
   private function itemClickHandler(event:ListEvent):void {
    if(event.columnIndex != 0){
     var customerData:Customer;
     customerData = event.itemRenderer.data as Customer;
     var customerEventObj:CustomerEvent = new CustomerEvent("selectCustomerEvent", customerData);
     dispatchEvent(customerEventObj);
   public function deleteCustomer(id:int):void{
    var cust:Customer = new Customer();
    cust.setId(id);
    this.customerService.deleteCustomer(cust);
    this.customerData.removeItemAt(customerGrid.selectedIndex);
  ]]>
</mx:Script>
<mx:DataGrid id="customerGrid" dataProvider="{customerData}" height="100%"
  itemClick="itemClickHandler(event)" width="340">
  <mx:columns>
   <mx:DataGridColumn deactivate="true" dataField="id" headerText=" " width="15">
          <mx:itemRenderer>
            <mx:Component>
              <mx:Image source="images/delete.jpg" click="outerDocument.deleteCustomer(data.id)"
               buttonMode="true" height="15" width="15"/>
            </mx:Component>
          </mx:itemRenderer>
        </mx:DataGridColumn>
   <mx:DataGridColumn dataField="lastName" headerText="Achternaam" />
   <mx:DataGridColumn dataField="firstName" headerText="Voorletters" />
  </mx:columns>
</mx:DataGrid>
</mx:Canvas>

Similar Messages

  • How to get the Next Material Document Number

    Hi,
    Please let me know How to get the next Material Document Number using Functional Module,
    Material Document number are  in MSEG table.
    Regards,
    Ganesh

    Hi Ganesh,
    if you want the next matrial number then first of all you have to define it as a number range in transaction snro.After creating the number range you have to define the interval.
    now you can use your number range by calling the function module
    CALL FUNCTION 'NUMBER_GET_NEXT'
          EXPORTING
            nr_range_nr             = '01' " here you have to give the number range number which you have defined in number range
            object                  = 'ZPRODLOG' " Number Range
          IMPORTING
            number                  = wa_prod_error_log-seqnr " sequence number generated,in your case material number field
          EXCEPTIONS
            interval_not_found      = 1
            number_range_not_intern = 2
            object_not_found        = 3
            quantity_is_0           = 4
            quantity_is_not_1       = 5
            interval_overflow       = 6
            buffer_overflow         = 7
            OTHERS                  = 8.
    each and every time next number will get generated .
    i hope this will help you.
    Thanks,
    Tanmaya

  • Getting the device's phone number

    Is it possible to get the device's phone number? Is it in the address book?
    Thanks

    You need to use the ABAddressBook functions to access the anything from the address book. Search the documentation for reference info and guides.
    As far as I know there is no way to determine the phone number of the iPhone.

  • How to get the multidementional hierarchy level number ?

    Dear all,
    Could anyone tell me how to receive the hierarchy level number like the picture below:
    [click here for the Screenshot|http://yaoxin.de/download/level.jpg]
    as you can see, when i mouse hove on a level, it shows the level number.
    but, I want to get the level number 2 (node number 2) in query designer, but i can't find anywhere to show that.
    thank you for your kind help !
    Edited by: Xin Yao on Aug 26, 2011 1:04 PM

    hi Charlie Belt,
    Thank you very much for your answer.
    And yes, I do wish to perform a calculation based (aggregation) on the hierarchy level.
    How can I continue working on that?
    yao
    wish you have a nice weekend!

  • I want to know how to get the Mobile IP or number

    source code for getting the IP of your mobile

    String localAddress = "127.0.0.1";
    try {
    SocketConnection con = (SocketConnection)
    ) Connector.open("socket://www.sun.com:80");
         localAddress = con.getLocalAddress());
    } catch (IOException e1) {
    //     e1.printStackTrace();
    System.out.println(localAddress);if you are using this code on BlackBerry's you have to add the deviceside flag:
    ...Connector.open("socket://www.sun.com:80;deviceside=true");
    ...atlan

  • How to get the ammendment sales order number and original sales order no?

    Hello sir's,
    Please tell me the table for ammendment(revised) sales order number and original sales order no.
    Thanks in advance,
    vikram

    Solved

  • Quick question: How to get the scrolled page number using af:table

    Hi,
    When using range paging on scrolled table, how to get the current scrolled page number(1,2,3...), for example when moving the table vertical scroll bar forward or backward, is there any method in ViewObjectImpl class that I can use to get such information? I have seen the method scrollToRangePage(int i), but when scrolled ("Fetching data..."), it doesn't not get into this method. So it is wrong usage for this method, right?
    Thanks

    Didn't you just ask that question in this thread?: How to catch the page number when using scroll table in ADF 11g?
    A bit of patience might be in order.
    CM.

  • Anybody know how to change your MSDN account phone number?

    The phone number used when my MSDN account was established is no long a valid (non-working) number.  I want to start using the MSDN Azure benefit but to activate it requires it to send you a text or get a call at the phone number on you account.  I've
    search all over my profile and can change my email address, time zone, country, language, yada, yada, yada, but nowhere have I found a way to change the phone number.
    Does anyone know where to go or how to change the MSDN account phone number?
    Eternally grateful,
    Frustrated in Phoenix
     

    Pretty sure what you're looking for F-I-Ph is at https://account.microsoft.com.  I see a "phones" tab on my version of that page. 
    Thanks,
    Mike
    MSDN and TechNet Subscriptions Support
    Did Microsoft call you out of the blue about your computer?
    No, they didn't.

  • HT4061 last night I stole my ipad and not how to get the serial number I have the itunes account that I do

    last night I stole my ipad and not how to get the serial number I have the itunes account that I do

    What To Do If Your iDevice or Computer Is Lost Or Stolen
    If your Mac, iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should do in advance - before you lose it or it's stolen - and some things to do after the fact. Here are some suggestions:
    Reporting a lost or stolen Apple product
    What-To-Do-When-Iphone-Is-Stolen
    Lost or Stolen iPhone? Here’s What to do.
    6 Ways to Track and Recover Your Lost/Stolen iPhone
    Find My iPhone
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
    Find My iPhone
    Setup your iDevice on MobileMe
    OS X Lion- About Find My Mac
    How To Set Up Free Find Your iPhone (Even on Unsupported Devices)
    Third-party solutions for computers:
    VUWER 1.5.4
    Sneaky ******* 0.2.0
    Undercover 4.7
    LoJack for Laptops Premium Mac
    STEM 2.1

  • HT4061 how go get the missed iphon's imei number

    i lose my i phone i dont know iemi number how to get the mised iphones imei number

    Read here for the various ways:
    http://support.apple.com/kb/HT4061
    Your carrier also has a record of your phone's IMEI number.

  • How to get the device token in windows phone 8 sliverlight application?

    Hi,
    I am developing a windows phone 8 silverlight application . For my application I want to add push notification service , for this service I have to call one web service in my app . This api requires device token , device id ..etc , I am able to get the all
    the things except devicetoken .
    How to get the device token of a device ?
    any help?
    Thanks...
    Suresh.M

    Most probably device token is the push channel url which is returned by MPNS when a request is made to it.
    Step 3 here: Push notifications for Windows Phone 8
    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

  • How do I change a cell phone number on my iPad. I have a new cell phone number and want to use the iCloud

    How do I change my cell phone number on my iCloud account with my iPad? I have a new number and want to activate the iCloud

    If you're talking about the phone number on your iPad for iMessage, the number is associated with the ID when you turn on iMessage on your iPhone.  If the number is incorrect, try turning off iMessage on your phone, wait a minute or so, then turn it back on.

  • Indesign CS3: How to get the number of the current layer?

    Hallo!
    How to get the number of the current layer in a page?
    Thanks,
    Alois Blaimer

    InterfacePtr<ILayerList> layerList(documentUIDRef, UseDefaultIID());          <br /><br />int32 layerCount = layerList->GetCount();<br /><br />To findout layer name use<br /><br />IDocumentLayer* documentLayer = layerList->QueryLayer(layerIndex);<br />                         <br />PMString layer=documentLayer->GetName();

  • How to get the number of years, months with two sysdate()

    Hi All,
    Sorry for posted another question regarding the conversion.
    I have the hiring day and current day in date format like : '2005-10-01' and '2006-09-14'
    How to get the differences between current date is ('2006-09-01') and
    hiring date is ('2004-10-01' )
    in the format number of years and number of month without using the Mod
    function . For this example the result is : 2 years 1 month
    Thanks
    JP

    How to get the differences between current date is ('2006-09-01') and
    hiring date is ('2004-10-01' )
    in the format number of years and number of month without using the Mod
    function . For this example the result is : 2 years 1 monthshould not it be 1 year 11 months???
    SQL> select (date '2006-09-01' - date '2004-10-01') year to month diff from dual;
    DIFF
    +01-11

  • How to get the 0 in front of a number

    I have a table column with number data type. How to get the column including the 0 in the front.
    For example: 066666 i want get 66666, not 066666.
    Thanks.

    Hi,
    Post your query and some data. Seriously. There are a number of different possible explanations, mostly invlolving TO_CHAR or COLUMN. I don't want to write them all, and you don't want to read them all.

Maybe you are looking for

  • My apps won't launch & menu bar missing all top left icons!!!

    A strange concurrence of multiple problems: I am a pretty advanced user and have an iBook G4/1.33 GHz running Tiger 10.4.8, but I am having trouble with my PowerMac G4/500 MHz running 10.3.9 right now. I keep my PowerMac in Panther since it is almost

  • 16:9 aspect ratio not "filling" TV screen

    Hi, I guess this has been asked before, but after a quick search I couldn't find a reference to this query. Q. A movie recorded in 16:9 on dv camera and then edited in iM HD (letterboxed) and then the final edit burnt onto DVD does not fill the TV wi

  • Error message when using Dynamic Link

    Have been trying to export video created in Primiere Pro CS4 to Encore.  I keep getting the following error message.  [..\..\src\AMEPresentProber.ccp-258]     I get this message with two different videos I have tried from different camera's/encoding.

  • How to save international numbers on iphone

    Hi, my uncle lives in europe and i would like to add his phone number to my contacts to chat with him on whatsapp or viber, but i dont know how to add an international contact to the contact list.

  • Printing via Aperture

    First, here is my configuration: Aperture 2.1.4 Printer: Canon Pixma Pro9500 Mark II Using Canon and Red River Paper 24" iMac running OSX 10.6.2 Although I have been using Aperture since version 2.0 was released, it has only been recently that I have