@Override @Transactional public void validate() { if (establishment != null && establishment.getName() != null && !"".equals(establishment.getName())) { final boolean isNameAlreadyExist = establishmentService.checkUniqueHospitalName(establishment.getName()); if (isNameAlreadyExist) addFieldError("nameAlreadyExist", getMessage("hospital.name.alreadyExist")); } }
@Override @Transactional @Action( value = "/establishment-create", results = {@Result(name = NEW, type = "dispatcher")}) public String create() { buildEstablishment(); establishmentService.save(establishment); // TODO egifix /* * addDropdownData("districtList", * bndCommonService.getDistrictByStateId( * Integer.valueOf(establishment.getAddress().getState()))); * addDropdownData("talukList", * bndCommonService.getTalukByDistrictId(Integer * .valueOf(districtName))); */ addDropdownData("cityList", bndCommonService.getCityByTalukId(Integer.valueOf(talukName))); mode = VIEW; return NEW; }