if (primaryContactVO == null) {
// avoid null pointers
primaryContactVO = new IndividualVO();
}
AddressVO primaryAddress = entityVO.getPrimaryAddress();
if (primaryAddress == null) {
// avoid null pointers
primaryAddress = new AddressVO();
}
// now, populate the form bean with the data
profileForm.set("entityName", entityVO.getName());
profileForm.set("firstName", primaryContactVO.getFirstName());
profileForm.set("middleName", primaryContactVO.getMiddleName());
profileForm.set("lastName", primaryContactVO.getLastName());
profileForm.set("title", primaryContactVO.getTitle());
profileForm.set("street1", primaryAddress.getStreet1());
profileForm.set("street2", primaryAddress.getStreet2());
profileForm.set("city", primaryAddress.getCity());
profileForm.set("zipCode", primaryAddress.getZip());
profileForm.set("website", primaryAddress.getWebsite());
GlobalMasterLists gml = GlobalMasterLists.getGlobalMasterLists(dataSource);
Vector stateList = (Vector)gml.get("States");
profileForm.set("state", primaryAddress.getStateName());
Vector countryList = (Vector)gml.get("Country");
profileForm.set("country", primaryAddress.getCountryName());
Collection mocList = entityVO.getMOC();
Iterator iterator = mocList.iterator();
int count = 1;
while (iterator.hasNext()) {