this.setContactType(ContactType.CT_CUSTOMER);
}
@Override
protected FmEditJbsBaseObject createEditForm() {
Logger logger = Logger.getLogger(PnCustomerList.class);
try {
logger.debug("Checking if module "+HierarchyCustomer.class.getSimpleName()+" exists...");
ModulesRemote moduleManagement = (ModulesRemote)ClientTools.getRemoteBean(ModulesRemote.class);
if (moduleManagement.hasModule(HierarchyCustomer.class.getSimpleName(), ClientGlobals.getUser(), ClientGlobals.getCompany())) {
logger.debug("Module exists - opening FmHierarchyCustomerEdit");
return new FmHierarchyCustomerEdit();
} else {
logger.debug("Module does not exist - opening FmCustomerEdit");
return new FmCustomerEdit();
}
} catch (Exception e) {
logger.error("Error looking for customer-module.",e);
return new FmCustomerEdit();
}
}