Class ListValueValidator
java.lang.Object
fr.paris.lutece.plugins.forms.validation.AbstractValidator
fr.paris.lutece.plugins.forms.validation.ListValueValidator
- All Implemented Interfaces:
ICustomImportableControl,IValidator
Validator to verify the exact value of a response
-
Constructor Summary
ConstructorsConstructorDescriptionListValueValidator(String strValidatorName, String strValidatorDisplayName, List<String> listAvailableEntryType) Constructor of the PatternValidator -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayHtml(Control control) getJavascriptControlValue(Control control) Only the content of the function should be returned.getNewValidatorValue(Control oldControl, Map<Integer, Integer> mapIdFields) from the imported control find the new control valuebooleanvalidate(FormQuestionResponse questionResponse, Control control) Methods inherited from class fr.paris.lutece.plugins.forms.validation.AbstractValidator
validate
-
Constructor Details
-
ListValueValidator
public ListValueValidator(String strValidatorName, String strValidatorDisplayName, List<String> listAvailableEntryType) Constructor of the PatternValidator- Parameters:
strValidatorName- The validator bean namestrValidatorDisplayName- The validator display namelistAvailableEntryType- The list of available entrytype
-
-
Method Details
-
getValidatorBeanName
- Specified by:
getValidatorBeanNamein interfaceIValidator- Overrides:
getValidatorBeanNamein classAbstractValidator- Returns:
- the validator bean name
-
getValidatorDisplayName
- Specified by:
getValidatorDisplayNamein interfaceIValidator- Overrides:
getValidatorDisplayNamein classAbstractValidator- Returns:
- the validator display name
-
getDisplayHtml
- Specified by:
getDisplayHtmlin interfaceIValidator- Overrides:
getDisplayHtmlin classAbstractValidator- Parameters:
control- The control to build model- Returns:
- the HTML to display
-
getListAvailableEntryType
- Specified by:
getListAvailableEntryTypein interfaceIValidator- Overrides:
getListAvailableEntryTypein classAbstractValidator- Returns:
- the list of available entrytype for this validator
-
validate
- Specified by:
validatein interfaceIValidator- Parameters:
questionResponse- The response to controlcontrol- The control to verify- Returns:
- boolean that indicate the validation result
-
getJavascriptValidation
Description copied from interface:IValidatorOnly the content of the function should be returned. The parameter names are in FormsConstants, JS_PARAMETER_INPUT_VALUE and JS_PARAMETER_CONTROL_VALUE- Specified by:
getJavascriptValidationin interfaceIValidator- Overrides:
getJavascriptValidationin classAbstractValidator- Returns:
- the javascript validation code for Conditional display control
-
getJavascriptControlValue
- Specified by:
getJavascriptControlValuein interfaceIValidator- Overrides:
getJavascriptControlValuein classAbstractValidator- Parameters:
control- The control- Returns:
- the control value needed for javascript
-
getNewValidatorValue
Description copied from interface:ICustomImportableControlfrom the imported control find the new control value- Specified by:
getNewValidatorValuein interfaceICustomImportableControl- Parameters:
oldControl- import controlmapIdFields- map of the old field id to find the new field id- Returns:
- the new control value
-