Class MultistepFormApp
java.lang.Object
sk.iway.iwcm.components.WebjetComponentAbstract
sk.iway.iwcm.components.multistep_form.mvc.MultistepFormApp
- All Implemented Interfaces:
WebjetComponentInterface
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class sk.iway.iwcm.components.WebjetComponentAbstract
appHideFields, cacheMinutes, device, EMPTY_PAGE, showForLoggedUser, wrapperAriaLabel, wrapperClass, wrapperId, wrapperTitle -
Constructor Summary
ConstructorsConstructorDescriptionMultistepFormApp(FormStepsRepository formStepsRepository, FormSettingsRepository formSettingsRepository, FormsRepository formsRepository) -
Method Summary
Modifier and TypeMethodDescriptiongetAppOptions(ComponentRequest componentRequest, jakarta.servlet.http.HttpServletRequest request) Builds editor options for available multistep forms and CSS templates.static List<LabelValue>Lists readable CSS template files available to the multistep form component.voidinit(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Initialization method for custom component initialization Called every time a component is inserted into the pagevoidsetCssTemplate(String cssTemplate) voidsetFormName(String formName) view(org.springframework.ui.Model model, jakarta.servlet.http.HttpServletRequest request) Prepares the first step of the configured form for rendering.Methods inherited from class sk.iway.iwcm.components.WebjetComponentAbstract
addCurrentValueToOptions, addCurrentValueToOptions, addOptions, buildWrapperDiv, getAppHideFields, getBaseAppOptions, getCacheMinutes, getDevice, getShowForLoggedUser, getViewFolder, getWrapperAriaLabel, getWrapperClass, getWrapperId, getWrapperTitle, init, initAppEditor, isEditorPreview, parseOptionsFromConfig, setAppHideFields, setCacheMinutes, setDevice, setShowForLoggedUser, setViewFolder, setWrapperAriaLabel, setWrapperClass, setWrapperId, setWrapperTitle
-
Field Details
-
DOC_ID
- See Also:
-
PERMITTED
- See Also:
-
START_TIME
- See Also:
-
COUNTER
- See Also:
-
-
Constructor Details
-
MultistepFormApp
@Autowired public MultistepFormApp(FormStepsRepository formStepsRepository, FormSettingsRepository formSettingsRepository, FormsRepository formsRepository)
-
-
Method Details
-
init
public void init(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Description copied from class:WebjetComponentAbstractInitialization method for custom component initialization Called every time a component is inserted into the page- Specified by:
initin interfaceWebjetComponentInterface- Overrides:
initin classWebjetComponentAbstract
-
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 viewrequest- 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:
getAppOptionsin interfaceWebjetComponentInterface- Overrides:
getAppOptionsin classWebjetComponentAbstract- Parameters:
componentRequest- current component editor requestrequest- current HTTP request used to localize option labels- Returns:
- options keyed by
formNameandcssTemplate
-
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
-
getFormSettingsRepository
-
getFormsRepository
-
getFormName
-
getCssTemplate
-
setFormName
-
setCssTemplate
-