Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anyone have a phone number formatter?




On Mar 29, 2007, at 6:58 PM, Kevin Windham wrote:
I am looking for info on how to create a formatter for phone numbers. I have surmised that I am supposed to use java.text.format in some fashion, but I am having trouble finding any examples.

Does anyone have any examples they can share, or can point me to some better info than the java docs on the class.


Just wanted to thank everyone for sending examples of how to create a formatter, especially to Dan whose phone formatter was very close to what I needed. A few minor modifications and everything worked great. The gist of the solution for future reference is to extend java.text.format and implement the parseObject method and the format method. The parseObject gets the data from the form field prior to it getting stored in the DB, and the format method is called to create the display string used when pulling data out of the DB.




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >Anyone have a phone number formatter? (From: Kevin Windham <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.