@Override
public void reload(JbsBaseObject jbsObject) {
super.reload(jbsObject);
if (jbsObject!=null) {
Address address = (Address)jbsObject;
String name = address.getName1();
if (!address.getFirstName().equals(""))
name+=", "+address.getFirstName();
this.addInfo(name);
if ((address.getName2()!=null) && (!address.getName2().equals("")))
this.addInfo(address.getName2());
if ((address.getName3()!=null) && (!address.getName3().equals("")))
this.addInfo(address.getName3());
this.addInfo(" ");
this.addInfo(address.getStreet());
String city = address.getCity();
if (!address.getZip().equals(""))
city=address.getZip()+" "+city;
this.addInfo(city);
this.addBlankLine();
if ((address.getPhone()!=null) && (!address.getPhone().equals(""))) {
this.addInfo(JbsL10N.getString("Address.phone")+": "+address.getPhone());
}
if ((address.getFax()!=null) && (!address.getFax().equals(""))) {
this.addInfo(JbsL10N.getString("Address.fax")+": "+address.getFax());
}
if ((address.getMobilePhone()!=null) && (!address.getMobilePhone().equals(""))) {
this.addInfo(JbsL10N.getString("Address.mobilePhone")+": "+address.getMobilePhone());
}
if ((address.getEmail()!=null) && (!address.getEmail().equals(""))) {
this.addBlankLine();
this.addInfo(address.getEmail());
}
if ((address.getName3()!=null) && (!address.getName3().equals("")))
this.addInfo(address.getName3());
if ((address.getName3()!=null) && (!address.getName3().equals("")))
this.addInfo(address.getName3());
/**@TODO
*
* Methode Sauberimplementiern und die Geschäftslogic in den Core auslagern
*
* Remote Interface
*
*/
AddressesBean addresses = new AddressesBean();
Address startAddress = new Address();
// ClientGlobals.getUser().getContact().getAddress() = null ??;
startAddress.setStreet(ClientGlobals.getCompany().getStreet());
startAddress.setZip(ClientGlobals.getCompany().getZip());
startAddress.setCity(ClientGlobals.getCompany().getCity());
this.addInfo("Luftline: " + addresses.getDistanceAsKM(startAddress, address) + "km");
}
}