throws CommunicationException, NamingException
{
String dataSource = Settings.getInstance().getSiteInfo(
CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
String status = returnStatus;
AddressVOX addressVOX = new AddressVOX(form);
HttpSession session = request.getSession();
UserObject userObject = (UserObject)session.getAttribute("userobject");
int individualID = userObject.getIndividualID();
ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
"com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
try {
ContactFacade remote = aa.create();
remote.setDataSource(dataSource);
int contactId = 0;
try {
contactId = Integer.parseInt((String)((DynaActionForm)form).get("recordID"));
} catch (NumberFormatException nfe) {
// carry on, we already set a default value
}
String listFor = (String)((DynaActionForm)form).get("listFor");
int contactType = 1;
if (listFor != null && listFor.equals("Entity")) {
contactType = 1;
} else if (listFor != null && listFor.equals("Individual")) {
contactType = 2;
}
remote.updateRelateAddress(addressVOX.getVO(), contactType, contactId, individualID);
} catch (Exception e) {
logger.error("[Exception] EditAddressHandler.Execute Handler ", e);
}
return status;
}