Package com.persequor.extension.frontend
Interface IForm
- All Superinterfaces:
IComponent<IFormContent>
,IContent<IFormContent>
,IFormContent
,IHasAttributes<IFormContent>
,IHasId<IFormContent>
,IScannerGroupContent
- All Known Subinterfaces:
IAppForm
public interface IForm
extends IFormContent, IComponent<IFormContent>, IHasAttributes<IFormContent>, IScannerGroupContent
-
Method Summary
Modifier and TypeMethodDescriptionaddSubmitButton
(String value) Deprecated.Deprecated.Deprecated.Deprecated.void
Deprecated.void
onFieldValue
(Width width, String parentNameField, List<String> matchValues, Consumer<IFormContent> consumer) default void
onFieldValue
(String parentNameField, List<String> matchValues, Consumer<IFormContent> consumer) void
scannerGroup
(Consumer<IScannerGroupContent> consumer) Add a scanner group, which can have multiple scanner fields.void
setAsyncActionName
(String asyncActionName) Set the name of the async action that should be triggered when the form is submitted.void
setMethod
(HttpMethod method) void
setSubmitButtonInfo
(IString buttonText, Icon icon) Deprecated.default void
setSubmitButtonInfo
(String buttonText, Icon icon) Deprecated.Methods inherited from interface com.persequor.extension.frontend.data.IComponent
half, quarter, setGridWidth, setHidden, sixth, third, twelfth, twoThirds
Methods inherited from interface com.persequor.extension.frontend.IContent
alert, alert, alert, alert, button, button, copyButton, copyButton, dateTime, divider, geoMap, geoMap, geoMap, graph, graph, graph, header, header, icon, iconButton, iconButton, iframe, iframe, iframe, image, image, itemList, mermaid, mermaid, number, number, number, paragraph, paragraph, pieChart, pieChart, pieChart, progressBar, section, section, svg, text, text, text, text, timeline, title, title, tree
Methods inherited from interface com.persequor.extension.frontend.IFormContent
actions, checkboxField, criteriaField, criteriaField, dateField, dateField, dateRangeField, dateRangeField, dateTimeField, dateTimeField, dateTimeField, dateTimeRangeField, dateTimeRangeField, helpDetails, hiddenDateTimeField, hiddenDateTimeField, hiddenField, hiddenField, inputField, locationField, multiInputField, multiSelectField, multiSelectField, numericField, numericField, numericField, numericField, passwordField, selectField, selectField, stepper, textAreaField, textAreaField, textField, textField, timeField, timeField, timeField, untranslatedMultiSelectField, untranslatedSelectField, uploadField
Methods inherited from interface com.persequor.extension.frontend.IHasAttributes
attr, attr, attr, attr, attr, attr
Methods inherited from interface com.persequor.extension.ioc.registry.IScannerGroupContent
autoOpen, multiScanField, multiScanField, scannerField, scannerField, setSubmitOnAllFullfilled, setTitle, showTitle
-
Method Details
-
onFieldValue
void onFieldValue(@Nonnull Width width, @Nonnull String parentNameField, @Nonnull List<String> matchValues, @Nonnull Consumer<IFormContent> consumer) - Parameters:
width
- the width of the area containing the conditional fieldsparentNameField
- the name of the field which value is used for matchingconsumer
- lambda function which is executed on field value matchmatchValues
- values which, when matched, will trigger the lambda
-
onFieldValue
default void onFieldValue(@Nonnull String parentNameField, @Nonnull List<String> matchValues, @Nonnull Consumer<IFormContent> consumer) - Parameters:
parentNameField
- the name of the field which value is used for matchingconsumer
- lambda function which is executed on field value matchmatchValues
- values which, when matched, will trigger the lambda
-
setSubmitButtonInfo
Deprecated.This will set the label and icon of the primary/first submit button- Parameters:
buttonText
- text on the submit buttonicon
- icon on the submit button
-
setSubmitButtonInfo
Deprecated.This will set the label and icon of the primary/first submit button- Parameters:
buttonText
- text on the submit buttonicon
- icon on the submit button
-
hideSubmitButton
Deprecated.This will hide the primary/first submit button. -
getSubmitButton
ISubmitButton getSubmitButton()- Returns:
- reference to the default submit button object
-
addSubmitButton
- Parameters:
value
- the value readable fromIInputData.getSubmitValue()
- Returns:
- reference to the button object
-
setMethod
- Parameters:
method
- HTTP method to be used by this form. Only POST and GET are supported. Defaults to POST.
-
setAsyncActionName
Set the name of the async action that should be triggered when the form is submitted.If this is set the form WILL NOT trigger a normal form submission, e.g. it will not cause the
IFrontendComponent.handle(IPage, IInputData)
method to be called.Instead, it will call
IFrontendComponent.handleAction(IAsyncActionChain, String, IInputData)
on theIFrontendComponent
that contains this form, with the asyncActionName as the actionName parameter.Submit value will be available in the
IInputData
object passed to the handleAction method, as normal, to enable differentiating between different submit buttons in the same form.Name must be a non-null, non-empty string.
- Parameters:
asyncActionName
- the name of the async action- See Also:
-
scannerGroup
Add a scanner group, which can have multiple scanner fields. The fields will be scanned using the same interface and the results will be persisted and send in the correct field based on the patterns.All scan values are available as strings, using
IInputData.getString(java.lang.String)
andIInputData.getMultiString(java.lang.String)
.- Parameters:
consumer
- used to set up the scanner fields
-
getOnLoad
Deprecated. -
getOnValidate
Deprecated. -
getOnChange
Deprecated. -
getOnSubmit
Deprecated.
-
getSubmitButton()
.ISubmitButton.hide()