Class InputDialogAction

java.lang.Object
io.jmix.ui.action.AbstractAction
io.jmix.ui.component.inputdialog.InputDialogAction
All Implemented Interfaces:
Action, Action.HasPrimaryState

public class InputDialogAction extends AbstractAction
Action can be used in InputDialog. It can handle specific InputDialogAction.InputDialogActionPerformed event for managing opened dialog.
See Also:
  • Field Details

    • validationRequired

      protected boolean validationRequired
  • Constructor Details

    • InputDialogAction

      public InputDialogAction(String id)
  • Method Details

    • actionPerform

      public void actionPerform(Component component)
      Description copied from interface: Action
      Invoked by owning component to execute the action.
      Parameters:
      component - invoking component
    • action

      public static InputDialogAction action(String id)
      Creates new instance of InputDialogAction.
      Parameters:
      id - action id
      Returns:
      input dialog action
    • withCaption

      public InputDialogAction withCaption(@Nullable String caption)
      Set caption using fluent API method.
      Parameters:
      caption - caption
      Returns:
      current instance of action
    • withDescription

      public InputDialogAction withDescription(@Nullable String description)
      Set description using fluent API method.
      Parameters:
      description - description
      Returns:
      current instance of action
    • withIcon

      public InputDialogAction withIcon(@Nullable String icon)
      Set icon using fluent API method.
      Parameters:
      icon - icon
      Returns:
      current instance of action
    • withIcon

      public InputDialogAction withIcon(Icons.Icon iconKey)
      Sets icon from icons set to the action (e.g. JmixIcon.DIALOG_OK).
      Parameters:
      iconKey - icon
      Returns:
      current instance of action
    • withShortcut

      public InputDialogAction withShortcut(@Nullable String shortcut)
      Set shortcut using fluent API method.
      Parameters:
      shortcut - shortcut
      Returns:
      current instance of action
    • withHandler

      Set action performed event handler using fluent API method. Can be used instead of subclassing BaseAction class.
      Parameters:
      handler - action performed handler
      Returns:
      current instance of action
    • withPrimary

      public InputDialogAction withPrimary(boolean primary)
      Set whether this action is primary using fluent API method. Can be used instead of subclassing BaseAction class.
      Parameters:
      primary - primary
      Returns:
      current instance of action
    • withValidationRequired

      public InputDialogAction withValidationRequired(boolean validationRequired)
      Set to true if handler should be invoked after successful validation. False - validation won't be preformed and handler will be invoked. Default value is true.
      Parameters:
      validationRequired - validation required option
      Returns:
      current instance of action
    • isValidationRequired

      public boolean isValidationRequired()
      Returns:
      true if handler should be invoked after successful validation