ItEr40S05ValidacionEProbasFuncionaisItEr39S05: Doing a more failsafe detaching of formBinder

This commit is contained in:
Óscar González Fernández 2009-12-21 14:39:44 +01:00
parent dc32e27e25
commit 3017d1c541

View file

@ -491,10 +491,14 @@ class FormBinder {
}
public void detach() {
this.applyButton.removeEventListener(Events.ON_CLICK,
applyButtonListener);
this.recommendedAllocationCheckbox.removeEventListener(Events.ON_CHECK,
recommendedCheckboxListener);
if (this.applyButton != null) {
this.applyButton.removeEventListener(Events.ON_CLICK,
applyButtonListener);
}
if (this.recommendedAllocationCheckbox != null) {
this.recommendedAllocationCheckbox.removeEventListener(
Events.ON_CHECK, recommendedCheckboxListener);
}
for (InputElement inputElement : inputsAssociatedWithOnChangeEnableApply) {
inputElement.removeEventListener(Events.ON_CHANGE,
onChangeEnableApply);