ArrayList addressCheckList = new ArrayList();
for (int i = 0; i < addressCheckBox.length; i++) {
int addressId = Integer.parseInt(addressCheckBox[i]);
addressCheckList.add(addressId+"");
remoteContactFacade.changeAddressRelate(addressId, contactID, contactType);
}
// delete un-used addresses
// Of course only delete the ones that weren't selected
// thats what all the following convoluted code does