Package nl.gx.forms.wmpformapi.api.form
Interface FormInputFragment
-
- All Superinterfaces:
BasicFormFragment
,BasicFormInputFragment
,FormFragment
,Presentable
,Wrapper
public interface FormInputFragment extends FormFragment, BasicFormInputFragment
Represents a simple form field that can have input. For example a simple text input.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FragmentValidator
createValidator(FragmentValidatorDefinition validator)
Creates a new validator for this FormFragment, based on the specified FragmentValidatorDefinition.void
deleteValidator(FragmentValidator validator)
Removes a FormFragmentValidator from this FormInputFragment.boolean
isRequired()
Returns whether this is a required fragment (automatically adds a required validator).void
setCustomValidators(List<BasicFormLogicComponent> validators)
Sets the List of custom validators for this FormFragment.void
setExtraText(String extraText)
Sets the extra text for this FormInputFragment.void
setHelpText(String helpText)
Sets the help text for this FormInputFragment.void
setPrefilling(String prefilling)
Sets the prefilling value for this FormInputFragment.void
setPrefillingExpression(String prefillingExpression)
Sets the JavaScript Expression that generates the prefilling value for this FormInputFragment.void
setPrefillingMode(PrefillingMode mode)
void
setRequired(boolean required)
Sets whether this is a required fragment.-
Methods inherited from interface nl.gx.forms.wmpformapi.api.BasicFormFragment
getFormFragmentContainer, getIdentifier, getName, getNestedPath, getParent, getPreconditionExpression
-
Methods inherited from interface nl.gx.forms.wmpformapi.api.BasicFormInputFragment
getCustomValidators, getDefaultValidators, getExtraText, getHelpText, getPrefilling, getPrefillingExpression, getPrefillingMode
-
Methods inherited from interface nl.gx.forms.wmpformapi.api.form.FormFragment
createSimplePreConditionExpression, deleteSimplePreConditionExpression, getComponent, getCssClassName, getDataFragmentTag, getDisplayLabel, getLanguageContainers, getOrCreateLanguageContainer, getPrecondition, getPreconditionMode, getSimplePreConditionExpression, getWmId, hasVersionInLocale, setCssClassName, setDataFragmentTag, setDisplayLabel, setIdentifier, setLanguageContainers, setName, setPrecondition, setPreconditionMode, setSimplePreConditionExpression
-
Methods inherited from interface nl.gx.webmanager.cms.core.Presentable
getPresentation, getPresentationVariant, render, render, setPresentation, setPresentationVariant
-
-
-
-
Method Detail
-
setCustomValidators
void setCustomValidators(List<BasicFormLogicComponent> validators)
Sets the List of custom validators for this FormFragment.- Parameters:
validators
- the List of custom validators for this FormFragment
-
createValidator
FragmentValidator createValidator(FragmentValidatorDefinition validator)
Creates a new validator for this FormFragment, based on the specified FragmentValidatorDefinition.- Parameters:
validator
- the fragment validator definition to base the new FragmentValidator on.- Returns:
- the new FragmentValidator
-
deleteValidator
void deleteValidator(FragmentValidator validator)
Removes a FormFragmentValidator from this FormInputFragment.- Parameters:
validator
- the validator that is to be deleted
-
setPrefilling
void setPrefilling(String prefilling)
Sets the prefilling value for this FormInputFragment.- Parameters:
prefilling
- the value to prefill in this FormInputFragment
-
setPrefillingMode
void setPrefillingMode(PrefillingMode mode)
-
setPrefillingExpression
void setPrefillingExpression(String prefillingExpression)
Sets the JavaScript Expression that generates the prefilling value for this FormInputFragment.- Parameters:
prefillingExpression
- the JavaScript expression
-
setHelpText
void setHelpText(String helpText)
Sets the help text for this FormInputFragment.- Parameters:
helpText
- the help text
-
setExtraText
void setExtraText(String extraText)
Sets the extra text for this FormInputFragment.- Parameters:
extraText
- the extra text for this FormInputFragment
-
isRequired
boolean isRequired()
Returns whether this is a required fragment (automatically adds a required validator).- Returns:
- whether this is a required fragment
-
setRequired
void setRequired(boolean required)
Sets whether this is a required fragment.- Parameters:
required
- true if this fragment cannot be left empty
-
-