*
* @throws InterruptedException
*/
public void doSave() throws InterruptedException {
final Customer aCustomer = getCustomer();
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// force validation, if on, than execute by component.getValue()
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if (!isValidationOn()) {
doSetValidation();
}
// fill the customer object with the components data
doWriteComponentsToBean(aCustomer);
// get the selected branch object from the listbox
// Listitem item = kunBranche.getSelectedItem();
if (StringUtils.isEmpty(kunBranche.getValue())) {
try {
Messagebox.show("Please select a branch !");
} catch (final InterruptedException e) {
throw new RuntimeException(e);
}
return;
}
// ListModelList lml1 = (ListModelList) kunBranche.getListModel();
// Branche branche = (Branche) lml1.get(item.getIndex());
// aCustomer.setBranche(branche);
if (kunMahnsperre.isChecked() == true) {
aCustomer.setKunMahnsperre(true);
} else {
aCustomer.setKunMahnsperre(false);
}
// save it to database
try {
getCustomerService().saveOrUpdate(aCustomer);