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.
  • Method Details

    • setCaption

      @StudioProperty(type=LOCALIZED_STRING) void setCaption(@Nullable String caption)
      Sets dialog caption.
      Parameters:
      caption - caption
    • getCaption

      @Nullable String getCaption()
      Returns:
      dialog caption
    • setWidth

      @StudioProperty(type=SIZE) void setWidth(@Nullable String width)
      Sets dialog width.
      Parameters:
      width - width
    • getWidth

      float getWidth()
      Returns:
      dialog width
    • getWidthSizeUnit

      SizeUnit getWidthSizeUnit()
      Returns:
      dialog width size unit
    • setHeight

      @StudioProperty(type=SIZE) void setHeight(@Nullable String height)
      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 id actionId is performed.
      Parameters:
      actionId - action id
    • getActionTarget

      @Nullable String 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 id actionId is clicked.
      Parameters:
      buttonId - button id
    • getButtonTarget

      @Nullable String getButtonTarget()
      Returns:
      id of button that triggers dialog
    • setDialogActions

      @StudioProperty(type=ENUMERATION) void setDialogActions(@Nullable DialogActions dialogActions)
      Defines a set of predefined actions to use in dialog.
      Parameters:
      dialogActions - one of DialogActions values
    • getDialogActions

      @Nullable DialogActions getDialogActions()
      Returns:
      set of predefined actions used in dialog
    • addCloseListener

      Subscription addCloseListener(Consumer<InputDialog.InputDialogCloseEvent> closeListener)
      Adds the given Consumer as dialog InputDialog.InputDialogCloseEvent listener.
      Parameters:
      closeListener - close listener
      Returns:
      close event subscription
    • setDialogResultHandler

      void setDialogResultHandler(Consumer<InputDialog.InputDialogResult> dialogResultHandler)
      Sets input dialog result handler.
      Parameters:
      dialogResultHandler - result handler
    • setValidator

      Sets additional handler for field validation. It receives input dialog context and must return ValidationErrors 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 of InputParameter
    • create

      InputDialog create()
      Creates InputDialog.
      Returns:
      input dialog instance
    • show

      InputDialog show()
      Shows InputDialog.