Interface ShowFormDialogOperation


public interface ShowFormDialogOperation
Operation enabling to show a form as a dialog. A container providing this API is be used to configure the operation, i.e., the dialog and form to be shown, and execute the operation once perform(Form, List) gets invoked.
Since:
5.0.100
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Exception informing about an invalid ruleset definition.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The operation's technical type to be used to look up the operation via an OperationAgent.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable FormData
    perform(@NotNull Form form, @NotNull List<Language> languages)
    Show a form based on the given structural definition and return the form's result.
    void
    setContextElement(@Nullable IDProvider element)
    Store element providing the context in which the form is displayed.
    void
    Set data, which are handled a default values, i.e., data that will be applied, if no values have been manually or initially been set.
    void
    setDisabled(boolean disabled)
    Define, whether the form should be disabled.
    void
    setFormData(@Nullable FormData data)
    Set data to be loaded initially to the form.
    void
    setModified(boolean modified)
    Define, whether the form should initially be marked modified.
    void
    setMultiLanguage(boolean active)
    Define, whether to allow for a multiple language form.
    void
    setOkText(String okText)
    Set the text for the OK action of the form.
    void
    setPreselectedLanguage(@Nullable Language language)
    Sets a preselected language
    void
    setRuleset(@NotNull String rulesetDefinition)
    Set the ruleset to be used by providing an XML-based definition.
    void
    Set the title for the form's dialog.
    void
    Set the UI style be the store type the form should base upon.
    void
    setValidation(boolean active)
    Define, whether to validate the form on confirmation.
  • Field Details

  • Method Details

    • setUiStyle

      void setUiStyle(Store.Type storeType)
      Set the UI style be the store type the form should base upon. If no type is given, the operation's context will define the fallback style.
      Parameters:
      storeType - The store type to base the ui style upon.
      Since:
      5.0.100
    • setTitle

      void setTitle(String title)
      Set the title for the form's dialog.
      Parameters:
      title - The dialog title.
      Since:
      5.0.100
    • setOkText

      void setOkText(String okText)
      Set the text for the OK action of the form. If no text is given, the common OK text will be used.
      Parameters:
      okText - The OK text.
      Since:
      5.0.100
    • setMultiLanguage

      void setMultiLanguage(boolean active)
      Define, whether to allow for a multiple language form.
      Parameters:
      active - If true, enable multiple language input.
      Since:
      5.0.100
    • setValidation

      void setValidation(boolean active)
      Define, whether to validate the form on confirmation. If validation is active, the form data must be valid to be accepted.
      Parameters:
      active - If true, enable validation.
      Since:
      5.0.100
    • setDisabled

      void setDisabled(boolean disabled)
      Define, whether the form should be disabled.
      Parameters:
      disabled - If true, form will be disabled.
      Since:
      5.0.100
    • setModified

      void setModified(boolean modified)
      Define, whether the form should initially be marked modified. If the form is not modified, the form usually cannot be confirmed but only be cancelled.
      Parameters:
      modified - If true, form will be marked modified.
      Since:
      5.0.100
    • setFormData

      void setFormData(@Nullable @Nullable FormData data)
      Set data to be loaded initially to the form.

      Note 1: The data object will not be used to store the form's resulting input.
      Note 2: Providing initial data does not have the same semantics as defaults being set to the form's definition.
      Note 3: The form definition provided by this data object will be ignored.

      Parameters:
      data - The date to be loaded.
      Since:
      5.0.102
    • setDefaults

      void setDefaults(FormData defaults)
      Set data, which are handled a default values, i.e., data that will be applied, if no values have been manually or initially been set.

      Note: If used in combination with perform(Form, List), defaults set to the form will be overridden by the ones given here.

      Parameters:
      defaults - The default data.
      Since:
      5.0.100
      See Also:
    • setContextElement

      void setContextElement(@Nullable @Nullable IDProvider element)
      Store element providing the context in which the form is displayed. Specifically, this needs not to be related to the form.
      Parameters:
      element - The contextual element for the form.
      Since:
      5.0.100
    • setRuleset

      void setRuleset(@NotNull @NotNull String rulesetDefinition)
      Set the ruleset to be used by providing an XML-based definition.
      Parameters:
      rulesetDefinition - An XML-based definition of rules.
      Since:
      5.0.100
    • setPreselectedLanguage

      void setPreselectedLanguage(@Nullable @Nullable Language language)
      Sets a preselected language
      Parameters:
      language - the language which should be preselected
      Since:
      5.2.180803
    • perform

      @Nullable @Nullable FormData perform(@NotNull @NotNull Form form, @NotNull @NotNull List<Language> languages) throws ShowFormDialogOperation.InvalidRulesetDefinition
      Show a form based on the given structural definition and return the form's result.
      Parameters:
      form - The form definition.
      languages - The languages to request in.
      Returns:
      The resulting data or null, if the form was cancelled.
      Throws:
      ShowFormDialogOperation.InvalidRulesetDefinition - If a given ruleset is invalid.
      Since:
      5.0.100