Class MultistepFormApp

java.lang.Object
sk.iway.iwcm.components.WebjetComponentAbstract
sk.iway.iwcm.components.multistep_form.mvc.MultistepFormApp
All Implemented Interfaces:
WebjetComponentInterface

public class MultistepFormApp extends WebjetComponentAbstract
Renders and configures the multistep form application.

The component prepares request-scoped form state, enforces the single-submission setting, exposes editor options, and resolves optional CSS templates.

  • Field Details

  • Constructor Details

  • Method Details

    • init

      public void init(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from class: WebjetComponentAbstract
      Initialization method for custom component initialization Called every time a component is inserted into the page
      Specified by:
      init in interface WebjetComponentInterface
      Overrides:
      init in class WebjetComponentAbstract
    • view

      public String view(org.springframework.ui.Model model, jakarta.servlet.http.HttpServletRequest request)
      Prepares the first step of the configured form for rendering.

      The handler rejects duplicate submissions when required, initializes the session state used by subsequent steps, and records the form view.

      Parameters:
      model - MVC model populated for the form view
      request - current HTTP request used to initialize form and session state
      Returns:
      path to the multistep form view, or the error view when another submission is not allowed
    • getAppOptions

      public Map<String,List<OptionDto>> getAppOptions(ComponentRequest componentRequest, jakarta.servlet.http.HttpServletRequest request)
      Builds editor options for available multistep forms and CSS templates.
      Specified by:
      getAppOptions in interface WebjetComponentInterface
      Overrides:
      getAppOptions in class WebjetComponentAbstract
      Parameters:
      componentRequest - current component editor request
      request - current HTTP request used to localize option labels
      Returns:
      options keyed by formName and cssTemplate
    • getCssTemplates

      public static List<LabelValue> getCssTemplates()
      Lists readable CSS template files available to the multistep form component.
      Returns:
      sorted label-value pairs containing each template file name and public path, or an empty list when the template directory is unavailable
    • getFormStepsRepository

      public FormStepsRepository getFormStepsRepository()
    • getFormSettingsRepository

      public FormSettingsRepository getFormSettingsRepository()
    • getFormsRepository

      public FormsRepository getFormsRepository()
    • getFormName

      public String getFormName()
    • getCssTemplate

      public String getCssTemplate()
    • setFormName

      public void setFormName(String formName)
    • setCssTemplate

      public void setCssTemplate(String cssTemplate)