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 givenConsumeras dialogInputDialog.InputDialogCloseEventlistener.create()Creates InputDialog.floatfloatgetWidth()voidsetActionTarget(String actionId) Sets that dialog should be shown when action with idactionIdis performed.voidsetButtonTarget(String buttonId) Sets that dialog should be shown when button with idactionIdis clicked.voidsetCaption(String caption) Sets dialog caption.voidsetDialogActions(DialogActions dialogActions) Defines a set of predefined actions to use in dialog.voidsetDialogResultHandler(Consumer<InputDialog.InputDialogResult> dialogResultHandler) Sets input dialog result handler.voidSets dialog height.voidsetParameters(InputParameter... parameters) Sets input dialog parameters.voidSets additional handler for field validation.voidSets dialog width.show()Shows InputDialog.Methods inherited from interface io.jmix.ui.component.ActionsAwareDialogFacet
getActions, setActionsMethods 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 idactionIdis 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 idactionIdis 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 ofDialogActionsvalues
-
getDialogActions
- Returns:
- set of predefined actions used in dialog
-
addCloseListener
Adds the givenConsumeras dialogInputDialog.InputDialogCloseEventlistener.- 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 returnValidationErrorsinstance. 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.
-