Class UserMenuAction<A extends UserMenuAction<A,C>,C extends JmixUserMenu<?>>

Type Parameters:
A - the type of the concrete action class extending UserMenuAction
C - the type of the JmixUserMenu that the action can be associated with
All Implemented Interfaces:
ExecutableAction, TargetAction<C>, Action, HasShortcutCombination
Direct Known Subclasses:
UserMenuSubstituteUserAction, UserMenuThemeSwitchAction

public abstract class UserMenuAction<A extends UserMenuAction<A,C>,C extends JmixUserMenu<?>> extends SecuredBaseAction<A> implements TargetAction<C>, ExecutableAction
An abstract base class for actions that can be associated with a specific JmixUserMenu.
  • Field Details

  • Constructor Details

    • UserMenuAction

      public UserMenuAction(String id)
  • Method Details

    • initAction

      protected void initAction()
    • getTarget

      public @Nullable C getTarget()
      Specified by:
      getTarget in interface TargetAction<A extends UserMenuAction<A,C>>
    • setTarget

      public void setTarget(@Nullable C target)
      Specified by:
      setTarget in interface TargetAction<A extends UserMenuAction<A,C>>
    • getMenuItem

      public @Nullable UserMenuItem getMenuItem()
      Returns the UserMenuItem associated with this action.
      Returns:
      the associated UserMenuItem, or null if no menu item is associated
    • setMenuItem

      public void setMenuItem(@Nullable UserMenuItem menuItem)
      Sets the UserMenuItem associated with this action.
      Parameters:
      menuItem - the new UserMenuItem to associate with this action, or null to disassociate the current menu item
    • setMenuItemInternal

      protected void setMenuItemInternal(@Nullable UserMenuItem menuItem)
    • setTargetInternal

      protected void setTargetInternal(@Nullable C target)
    • actionPerform

      public void actionPerform(com.vaadin.flow.component.Component component)
      Description copied from interface: Action
      Executes action logic.
      Specified by:
      actionPerform in interface Action
      Overrides:
      actionPerform in class ObservableBaseAction<A extends UserMenuAction<A,C>>
      Parameters:
      component - Component that triggered this action
    • withTarget

      public A withTarget(@Nullable C target)
    • checkTarget

      protected void checkTarget()