Modifying the sMSEdit window

I took a quick look at this 

The quick and dirty way of modifying this was to leave the regex stripping code in place and run it over the result returned to the phone number including the result returned from the new phone number display.  It would work but I think its so prone to errors for internationalization

The alternative was to recreate the phoneproperty to hold the entire Contact rather than just a string representation.  

phoneProperty = new SimpleProperty("phone", null, Contacts.class, Messages.get("sms.phone"));

The theory was to enable the contact object to be passed through the process and utilize the existing formatting rules we have to output the correct infomation when we need it.

Unfortunately due to my limited programming with transforming objects etc it appears it may well be more difficult to process a listModel for contacts.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Modifying the sMSEdit window

I think the "phone number (name)" format can be supported within the SMSEditor.formatPhone(Contact) method. I don't think anything needs to be done to handle numbers where the name has been entered with the phone number. They will continue to display as is.

Re: Modifying the sMSEdit window

https://openvpms.atlassian.net/browse/OVPMS-1475 

opened and patched

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au
Syndicate content