Package io.jmix.ui.component.inputdialog
Class InputDialogAction
java.lang.Object
io.jmix.ui.action.AbstractAction
io.jmix.ui.component.inputdialog.InputDialogAction
- All Implemented Interfaces:
Action
,Action.HasPrimaryState
Action can be used in
InputDialog
. It can handle specific InputDialogAction.InputDialogActionPerformed
event for
managing opened dialog.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Describes action performed event fromInputDialogAction
.Nested classes/interfaces inherited from interface io.jmix.ui.action.Action
Action.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.ExecutableAction, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.MainTabSheetAction, Action.OperationResultAction, Action.ScreenAction<S extends Screen>, Action.ScreenOpeningAction, Action.SecuredAction, Action.Status
-
Field Summary
Fields inherited from class io.jmix.ui.action.AbstractAction
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visible
Fields inherited from interface io.jmix.ui.action.Action
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputDialogAction
Creates new instance of InputDialogAction.void
actionPerform
(Component component) Invoked by owning component to execute the action.boolean
withCaption
(String caption) Set caption using fluent API method.withDescription
(String description) Set description using fluent API method.Set action performed event handler using fluent API method.withIcon
(Icons.Icon iconKey) Sets icon from icons set to the action (e.g.Set icon using fluent API method.withPrimary
(boolean primary) Set whether this action is primary using fluent API method.withShortcut
(String shortcut) Set shortcut using fluent API method.withValidationRequired
(boolean validationRequired) Set to true if handler should be invoked after successful validation.Methods inherited from class io.jmix.ui.action.AbstractAction
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setPrimary, setShortcut, setShortcutCombination, setVisible
-
Field Details
-
validationRequired
protected boolean validationRequired
-
-
Constructor Details
-
InputDialogAction
-
-
Method Details
-
actionPerform
Description copied from interface:Action
Invoked by owning component to execute the action.- Parameters:
component
- invoking component
-
action
Creates new instance of InputDialogAction.- Parameters:
id
- action id- Returns:
- input dialog action
-
withCaption
Set caption using fluent API method.- Parameters:
caption
- caption- Returns:
- current instance of action
-
withDescription
Set description using fluent API method.- Parameters:
description
- description- Returns:
- current instance of action
-
withIcon
Set icon using fluent API method.- Parameters:
icon
- icon- Returns:
- current instance of action
-
withIcon
Sets icon from icons set to the action (e.g. JmixIcon.DIALOG_OK).- Parameters:
iconKey
- icon- Returns:
- current instance of action
-
withShortcut
Set shortcut using fluent API method.- Parameters:
shortcut
- shortcut- Returns:
- current instance of action
-
withHandler
public InputDialogAction withHandler(Consumer<InputDialogAction.InputDialogActionPerformed> handler) 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
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
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
-