Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 1.02 KB

File metadata and controls

15 lines (10 loc) · 1.02 KB
ClearAction

ClearAction is a picker field action designed to clear the picker field. If the field displays a one-to-one composition entity, the entity instance will also be removed on DataContext commit (if the screen is an entity editor, it happens when the user clicks OK).

The action is implemented by com.haulmont.cuba.gui.actions.picker.ClearAction class and should be defined in XML using type="picker_clear" action’s attribute. You can configure common action parameters using XML attributes of the action element, see [declarative_actions] for details.

If you want to perform some checks or interact with the user before the action is executed, subscribe to the action’s ActionPerformedEvent and invoke execute() method of the action when needed. In the example below, we show a confirmation dialog before executing the action:

link:../../../../../../source/gui/std_actions/clear/09.java[role=include]