@Override
public void run()
{
final AddressClientService acs = (AddressClientService) Engine.instance().getManager(
AddressClientService.ID);
final Address address = acs.getAddress(addressStoreName, addressDn);
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
salutation.setText(Engine.instance().getResourceService().getString(address.getSalutation()));
firstName.setText(address.getFirstName());
lastName.setText(address.getLastName());
company.setText(address.getCompany());
division.setText(address.getDivision());
position.setText(address.getPosition());
street.setText(address.getStreet());
postalCodeAndCity.setText(address.getPostalCode() + " " + address.getCity());
country.setText(address.getCountry());
email.setText(address.getEmail());
homepage.setText(address.getHomepage());
contactNumber.setText(address.getContactNumber());
companyNumber.setText(address.getCompanyNumber());
homepage.setText(address.getHomepage());
remark.setText(address.getRemark());
phoneNumberB.setText(address.getPhoneNumberWithCategory(PhoneNumber.Category.B)
.getDisplayNumber());
phoneNumberBDD.setText(address.getPhoneNumberWithCategory(PhoneNumber.Category.BDD)
.getDisplayNumber());
phoneNumberBF.setText(address.getPhoneNumberWithCategory(PhoneNumber.Category.BF)
.getDisplayNumber());
phoneNumberBM.setText(address.getPhoneNumberWithCategory(PhoneNumber.Category.BM)
.getDisplayNumber());
phoneNumberP.setText(address.getPhoneNumberWithCategory(PhoneNumber.Category.P)
.getDisplayNumber());
phoneNumberPF.setText(address.getPhoneNumberWithCategory(PhoneNumber.Category.PF)
.getDisplayNumber());
phoneNumberPM.setText(address.getPhoneNumberWithCategory(PhoneNumber.Category.PM)
.getDisplayNumber());
phoneNumberVOIP.setText(address.getPhoneNumberWithCategory(PhoneNumber.Category.VOIP)
.getDisplayNumber());
if (callerInfo == null)
{
frame.setTitle(Engine.instance().getResourceService().getStringWithParams(
"addressOf",
address.getFirstName() + (StringTools.isNotTrimEmpty(firstName) ? " " : "")
+ address.getLastName()
+ (StringTools.isNotTrimEmpty(company) ? " " : "")
+ address.getCompany()));
}
}
});
}
}.start();