Interface HasAction

All Known Implementing Classes:
BreadCrumbsPresenter.NavigationButton, ComboButton, GridContextMenuItemComponent, GridMenuItemActionWrapper, JmixButton, ValuePickerButton

public interface HasAction
Interface to be implemented by UI components supporting an action.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default void
    setAction(Action action)
    Sets the action to the component.
    void
    setAction(Action action, boolean overrideComponentProperties)
    Sets the action to the component.
  • Method Details

    • setAction

      default void setAction(@Nullable Action action)
      Sets the action to the component. Action properties override component's properties.

      List of properties that the action and the component have and which can be overridden:

      • caption
      • description
      • shortcutCombination
      • enabled
      • visible
      • icon
      • variant
      Parameters:
      action - an action to set
    • setAction

      void setAction(@Nullable Action action, boolean overrideComponentProperties)
      Sets the action to the component. If overrideComponentProperties is true then the action properties will override component's properties, otherwise the component's properties will be overridden if they are null.

      List of properties that the action and the component have and which can be overridden:

      • text
      • description
      • shortcutCombination
      • enabled
      • visible
      • icon
      • variant
      Parameters:
      action - an action to set
      overrideComponentProperties - whether action properties override component properties
    • getAction

      @Nullable Action getAction()
      Returns:
      an action or null