In Jmix 2.7.4, the entity_clear action triggered a ComponentValueChangeEvent. However, this doesn’t happen in Jmix 2.8. It’s easy to code a separate handler but I suspect this is a bug that should be fixed.
Previously, a clear action in multiSelectComboBoxPicker:
<multiSelectComboBoxPicker id="colorField" itemsContainer="colorsDc"
metaClass="Colors" width="15em" label="Select a color and then clear it">
<actions>
<action id="clearColor" type="entity_clear" icon="vaadin:close-small"/>
</actions>
</multiSelectComboBoxPicker>
would cause the following handler to execute:
@Subscribe("colorField")
public void onColorFieldComponentValueChange(final AbstractField.ComponentValueChangeEvent<JmixMultiSelectComboBoxPicker<Colors>, Colors> event) {
dialogs.createMessageDialog()
.withHeader("Value changed")
.withText("this handler does not get triggered during entity_clear action")
.open();
}
Attached is sample code in a zip file.
entity-clear-bug.zip (124.3 KB)