mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
Removing null action throws exception for WebPickerField #PL-4814
This commit is contained in:
parent
a3534674c5
commit
9d09791d9a
@ -282,11 +282,13 @@ public class WebPickerField extends WebAbstractField<CubaPickerField> implements
|
||||
|
||||
@Override
|
||||
public void removeAction(Action action) {
|
||||
actions.remove(action);
|
||||
actionHandler.removeAction(action);
|
||||
if (action.getOwner() != null && action.getOwner() instanceof WebButton) {
|
||||
Button button = ((WebButton) action.getOwner()).getComponent();
|
||||
component.removeButton(button);
|
||||
if (action != null) {
|
||||
actions.remove(action);
|
||||
actionHandler.removeAction(action);
|
||||
if (action.getOwner() != null && action.getOwner() instanceof WebButton) {
|
||||
Button button = ((WebButton) action.getOwner()).getComponent();
|
||||
component.removeButton(button);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -351,11 +351,13 @@ public class WebPickerField
|
||||
|
||||
@Override
|
||||
public void removeAction(Action action) {
|
||||
actions.remove(action);
|
||||
actionHandler.removeAction(action);
|
||||
if (action.getOwner() != null && action.getOwner() instanceof WebButton) {
|
||||
Button button = ((WebButton) action.getOwner()).getComponent();
|
||||
component.removeButton(button);
|
||||
if (action != null) {
|
||||
actions.remove(action);
|
||||
actionHandler.removeAction(action);
|
||||
if (action.getOwner() != null && action.getOwner() instanceof WebButton) {
|
||||
Button button = ((WebButton) action.getOwner()).getComponent();
|
||||
component.removeButton(button);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user