protected abstract void updateCriterionsWithDiferentResourceType(
HoursGroupWrapper hoursGroupWrapper);
public void selectResourceType(Combobox combobox)
throws InterruptedException {
HoursGroupWrapper hoursGroupWrapper = (HoursGroupWrapper) ((Row) combobox
.getParent()).getValue();
if (combobox.getSelectedItem() != null) {
try {
int status = Messagebox
.show(
_("Are you sure of changing the resource type? You will lose the criteria with different resource type."),
"Question", Messagebox.OK | Messagebox.CANCEL,
Messagebox.QUESTION);
if (Messagebox.OK == status) {
ResourceEnum resource = (ResourceEnum) combobox
.getSelectedItem().getValue();
hoursGroupWrapper.assignResourceType(resource);
updateCriterionsWithDiferentResourceType(hoursGroupWrapper);
}
} catch (InterruptedException e) {
throw new RuntimeException(e);
}