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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to