Package io.jmix.ui.component
Interface InputDialogFacet
- All Superinterfaces:
ActionsAwareDialogFacet<InputDialogFacet>
,Facet
,HasSubParts
- All Known Implementing Classes:
InputDialogFacetImpl
@StudioFacet(xmlElement="inputDialog",
caption="InputDialog",
description="Prepares and shows input dialogs",
defaultProperty="caption",
category="Facets",
icon="io/jmix/ui/icon/facet/dialog.svg",
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/facets/input-dialog-facet.html")
public interface InputDialogFacet
extends Facet, ActionsAwareDialogFacet<InputDialogFacet>, HasSubParts
Prepares and shows input dialogs.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.ActionsAwareDialogFacet
ActionsAwareDialogFacet.DialogAction<T>, ActionsAwareDialogFacet.DialogActionPerformedEvent<T>
-
Method Summary
Modifier and TypeMethodDescriptionaddCloseListener
(Consumer<InputDialog.InputDialogCloseEvent> closeListener) Adds the givenConsumer
as dialogInputDialog.InputDialogCloseEvent
listener.create()
Creates InputDialog.float
float
getWidth()
void
setActionTarget
(String actionId) Sets that dialog should be shown when action with idactionId
is performed.void
setButtonTarget
(String buttonId) Sets that dialog should be shown when button with idactionId
is clicked.void
setCaption
(String caption) Sets dialog caption.void
setDialogActions
(DialogActions dialogActions) Defines a set of predefined actions to use in dialog.void
setDialogResultHandler
(Consumer<InputDialog.InputDialogResult> dialogResultHandler) Sets input dialog result handler.void
Sets dialog height.void
setParameters
(InputParameter... parameters) Sets input dialog parameters.void
Sets additional handler for field validation.void
Sets dialog width.show()
Shows InputDialog.Methods inherited from interface io.jmix.ui.component.ActionsAwareDialogFacet
getActions, setActions
Methods inherited from interface io.jmix.ui.component.HasSubParts
getSubPart
-
Method Details
-
setCaption
Sets dialog caption.- Parameters:
caption
- caption
-
getCaption
- Returns:
- dialog caption
-
setWidth
Sets dialog width.- Parameters:
width
- width
-
getWidth
float getWidth()- Returns:
- dialog width
-
getWidthSizeUnit
SizeUnit getWidthSizeUnit()- Returns:
- dialog width size unit
-
setHeight
Sets dialog height.- Parameters:
height
- height
-
getHeight
float getHeight()- Returns:
- dialog height
-
getHeightSizeUnit
SizeUnit getHeightSizeUnit()- Returns:
- dialog height size unit
-
setActionTarget
@StudioProperty(name="onAction", type=COMPONENT_REF, options="io.jmix.ui.action.Action") void setActionTarget(@Nullable String actionId) Sets that dialog should be shown when action with idactionId
is performed.- Parameters:
actionId
- action id
-
getActionTarget
- Returns:
- id of action that triggers dialog
-
setButtonTarget
@StudioProperty(name="onButton", type=COMPONENT_REF, options="io.jmix.ui.component.Button") void setButtonTarget(@Nullable String buttonId) Sets that dialog should be shown when button with idactionId
is clicked.- Parameters:
buttonId
- button id
-
getButtonTarget
- Returns:
- id of button that triggers dialog
-
setDialogActions
Defines a set of predefined actions to use in dialog.- Parameters:
dialogActions
- one ofDialogActions
values
-
getDialogActions
- Returns:
- set of predefined actions used in dialog
-
addCloseListener
Adds the givenConsumer
as dialogInputDialog.InputDialogCloseEvent
listener.- Parameters:
closeListener
- close listener- Returns:
- close event subscription
-
setDialogResultHandler
Sets input dialog result handler.- Parameters:
dialogResultHandler
- result handler
-
setValidator
Sets additional handler for field validation. It receives input dialog context and must returnValidationErrors
instance. Returned validation errors will be shown with another errors from fields.- Parameters:
validator
- validator
-
setParameters
@StudioElementsGroup(xmlElement="parameters", caption="Parameters", icon="io/jmix/ui/icon/element/parameters.svg") void setParameters(InputParameter... parameters) Sets input dialog parameters.- Parameters:
parameters
- set ofInputParameter
-
create
InputDialog create()Creates InputDialog.- Returns:
- input dialog instance
-
show
InputDialog show()Shows InputDialog.
-