Package io.jmix.flowui.app.inputdialog
Class InputDialog
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.view.View<ViewLayout>
io.jmix.flowui.view.StandardView
io.jmix.flowui.app.inputdialog.InputDialog
- All Implemented Interfaces:
- com.vaadin.flow.component.AttachNotifier,- com.vaadin.flow.component.DetachNotifier,- com.vaadin.flow.component.HasElement,- com.vaadin.flow.component.HasStyle,- com.vaadin.flow.router.AfterNavigationObserver,- com.vaadin.flow.router.BeforeEnterObserver,- com.vaadin.flow.router.BeforeLeaveObserver,- com.vaadin.flow.router.HasDynamicTitle,- com.vaadin.flow.router.internal.AfterNavigationHandler,- com.vaadin.flow.router.internal.BeforeEnterHandler,- com.vaadin.flow.router.internal.BeforeLeaveHandler,- Serializable
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic classDescribes result of handler that can be used withDialogActionin the input dialog.static classDescribes input dialog validation context.Nested classes/interfaces inherited from class io.jmix.flowui.view.ViewView.AfterCloseEvent, View.BeforeCloseEvent, View.BeforeShowEvent, View.InitEvent, View.QueryParametersChangeEvent, View.ReadyEvent
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected com.vaadin.flow.component.orderedlayout.HorizontalLayoutprotected Actionsprotected DatatypeRegistryprotected DialogActionsprotected com.vaadin.flow.component.formlayout.FormLayoutstatic final CloseActionACloseActionused when the user clicks "CANCEL" button.static final CloseActionACloseActionused when the user clicks "NO" button.static final CloseActionACloseActionused when the user clicks "OK" button and fields validation is successful.static final CloseActionACloseActionused when the user clicks "YES" button and fields validation is successful.protected Messagesprotected Metadataprotected Stringprotected List<InputParameter>protected List<com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep>protected Consumer<InputDialog.InputDialogResult>protected UiComponentsprotected UiComponentsGeneratorprotected ViewValidation
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddCloseListener(com.vaadin.flow.component.ComponentEventListener<InputDialog.InputDialogCloseEvent> listener) Adds a close listener to the input dialog.protected DialogActioncreateDialogAction(DialogAction.Type type, CloseAction closeAction) protected com.vaadin.flow.component.ComponentcreateField(InputParameter parameter) protected voidfillFieldAttributes(com.vaadin.flow.component.Component field, InputParameter parameter) protected voidfireCloseAndResultEvents(CloseAction closeAction) Returns predefined dialog actions.com.vaadin.flow.component.formlayout.FormLayoutprotected com.vaadin.flow.component.ComponentgetFormLayoutComponentById(String parameterId) List<com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep><T> TReturns value from parameter by its id.Returns values from parameters.protected voidprotected voidinitActions(List<Action> actions) protected voidprotected voidprotected voidprotected voidbooleanisValid()Validates form components and conditions from custom validation supplier and show errors.protected com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep.LabelsPositionlabelsPositionFromModel(Dialogs.InputDialogBuilder.LabelsPosition labelsPosition) protected voidonAfterClose(View.AfterCloseEvent event) protected voidonBeforeShow(View.BeforeShowEvent event) voidonInit(View.InitEvent event) voidsetActions(InputDialogAction... actions) Sets dialog actions.voidsetDialogActions(DialogActions actions) Sets predefined dialog actions.voidsetLabelsPosition(Dialogs.InputDialogBuilder.LabelsPosition labelsPosition) Sets labels position for default responsiveSteps.voidsetPageTitle(String pageTitle) voidsetParameter(InputParameter parameter) Add input parameter to the dialog.voidsetParameters(InputParameter... parameters) Sets input parameters.voidsetResponsiveSteps(List<com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep> responsiveSteps) Sets responsive steps.voidsetResultHandler(Consumer<InputDialog.InputDialogResult> resultHandler) Sets handler for dialog actions (e.g.voidSets additional handler for field validation.Methods inherited from class io.jmix.flowui.view.StandardViewinitContentMethods inherited from class io.jmix.flowui.view.ViewaddAfterCloseListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, addQueryParametersChangeListener, addReadyListener, afterNavigation, beforeEnter, beforeLeave, close, close, closeWithDefaultAction, getApplicationContext, getId, getReturnParameters, getViewActions, getViewAttributes, getViewData, getViewFacets, getViewSupport, isPreventBrowserTabClosing, onAttach, onDetach, setApplicationContext, setId, setPreventBrowserTabClosing, setViewActions, setViewData, setViewFacetsMethods inherited from class com.vaadin.flow.component.CompositegetChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.ComponentaddListener, findAncestor, fireEvent, from, get, getEventBus, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setVisibleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifieraddAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifieraddDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyleaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
- 
Field Details- 
INPUT_DIALOG_OK_ACTIONACloseActionused when the user clicks "OK" button and fields validation is successful.
- 
INPUT_DIALOG_CANCEL_ACTIONACloseActionused when the user clicks "CANCEL" button.
- 
INPUT_DIALOG_YES_ACTIONACloseActionused when the user clicks "YES" button and fields validation is successful.
- 
INPUT_DIALOG_NO_ACTIONACloseActionused when the user clicks "NO" button.
- 
parameters
- 
actionsList
- 
viewValidation
- 
uiComponents
- 
messages
- 
metadata
- 
datatypeRegistry
- 
actions
- 
uiComponentsGenerator
- 
formLayoutprotected com.vaadin.flow.component.formlayout.FormLayout formLayout
- 
actionBoxprotected com.vaadin.flow.component.orderedlayout.HorizontalLayout actionBox
- 
responsiveSteps
- 
labelsPosition
- 
dialogActions
- 
idToContentMap
- 
resultHandler
- 
validator
- 
pageTitle
 
- 
- 
Constructor Details- 
InputDialogpublic InputDialog()
 
- 
- 
Method Details- 
onInit
- 
initFormLayoutprotected void initFormLayout()
- 
initActionBoxprotected void initActionBox()
- 
onBeforeShow
- 
onAfterClose
- 
getValueReturns value from parameter by its id.- Parameters:
- parameterId- parameter id
- Returns:
- parameter value
- Throws:
- IllegalArgumentException- exception if wrong parameter id is sent
 
- 
getValuesReturns values from parameters. String - parameter id, Object - parameter value.- Returns:
- values
 
- 
setParameterAdd input parameter to the dialog. Input parameter will be represented as a field.- Parameters:
- parameter- input parameter that will be added to the dialog
 
- 
setParametersSets input parameters.- Parameters:
- parameters- input parameters
 
- 
getParameters- Returns:
- input parameters from dialog
 
- 
setResponsiveStepspublic void setResponsiveSteps(List<com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep> responsiveSteps) Sets responsive steps. Responsive steps used in describing the responsive layouting behavior of aFormLayout.- Parameters:
- responsiveSteps- - responsive steps
 
- 
getResponsiveSteps- Returns:
- responsive steps of FormLayout
 
- 
setLabelsPositionSets labels position for default responsiveSteps.- Parameters:
- labelsPosition- position of labels
 
- 
getLabelsPosition- Returns:
- labels position for default responsiveSteps
 
- 
addCloseListenerpublic com.vaadin.flow.shared.Registration addCloseListener(com.vaadin.flow.component.ComponentEventListener<InputDialog.InputDialogCloseEvent> listener) Adds a close listener to the input dialog.- Parameters:
- listener- close listener to add
- Returns:
- registration
 
- 
setActionsSets dialog actions. If there is no actions are set input dialog will useDialogActions.OK_CANCEL.- Parameters:
- actions- actions
- See Also:
 
- 
getActions- Returns:
- actions list
 
- 
setDialogActionsSets predefined dialog actions. By default, if there is no actions are input dialog will useDialogActions.OK_CANCEL.- Parameters:
- actions- actions
 
- 
getDialogActionsReturns predefined dialog actions.DialogActions.OK_CANCELby default.- Returns:
- dialog actions
 
- 
setResultHandlerSets handler for dialog actions (e.g. OK, CANCEL, etc) that are used in the dialog. Handler is invoked after close event and can be used instead ofaddCloseListener(ComponentEventListener).Note, it is worked only with setDialogActions(DialogActions). Custom actions are not handled.- Parameters:
- resultHandler- result handler
 
- 
getResultHandler- Returns:
- result handler
 
- 
isValidpublic boolean isValid()Validates form components and conditions from custom validation supplier and show errors.- Returns:
- true if validation is successful
 
- 
setValidatorSets additional handler for field validation. It takes values map and must returnValidationErrorsinstance. Returned validation errors will be shown with another errors from fields.- Parameters:
- validator- validator
 
- 
getValidator- Returns:
- additional field validator
 
- 
initParametersprotected void initParameters()
- 
fillFieldAttributesprotected void fillFieldAttributes(com.vaadin.flow.component.Component field, InputParameter parameter) 
- 
getFormLayoutComponentById@Nullable protected com.vaadin.flow.component.Component getFormLayoutComponentById(String parameterId) 
- 
createField
- 
initActions
- 
initDialogActionsprotected void initDialogActions()
- 
initResponsiveStepsprotected void initResponsiveSteps()
- 
createDialogAction
- 
fireCloseAndResultEvents
- 
setPageTitle
- 
getPageTitle- Specified by:
- getPageTitlein interface- com.vaadin.flow.router.HasDynamicTitle
- Overrides:
- getPageTitlein class- View<ViewLayout>
 
- 
getFormLayoutpublic com.vaadin.flow.component.formlayout.FormLayout getFormLayout()
- 
labelsPositionFromModelprotected com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep.LabelsPosition labelsPositionFromModel(Dialogs.InputDialogBuilder.LabelsPosition labelsPosition) 
 
-