ArrayList methodOfContactCheckList = new ArrayList();
for (int i = 0; i < methodOfContactCheckBox.length; i++) {
int mocId = Integer.parseInt(methodOfContactCheckBox[i]);
methodOfContactCheckList.add(mocId+"");
remoteContactFacade.changeMOCRelate(mocId, entityId, contactType);
}
// delete un-used mocs.
// Of course only delete the ones that weren't selected
// thats what all the following convoluted code does