RefreshAction is a list action designed to reload the data container used by the table or tree component.

The action is implemented by the io.jmix.ui.action.list.RefreshAction class and should be defined in XML using type="refresh" 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 the execute() method of the action when needed. In the example below, we show a custom confirmation dialog before executing the action:

private RefreshAction refreshAction;

public void onCustTableRefresh(Action.ActionPerformedEvent event) {
            .withCaption("Please confirm")
            .withMessage("Are you sure you want to refresh the list?")
                    new DialogAction(DialogAction.Type.YES)
                            .withHandler(e -> refreshAction.execute()), // execute action
                    new DialogAction(DialogAction.Type.NO)

You can also subscribe to ActionPerformedEvent, and instead of invoking the action’s execute() method, trigger the data loader directly. For example:

private CollectionLoader<Customer> customersDl;

public void onCustTableRefreshAction(Action.ActionPerformedEvent event) {