public abstract class ValidatorControl extends Control implements IValidatorControl
Modifier and Type | Field and Description |
---|---|
protected boolean |
clientSideValidationEnabled |
static String |
DEFAULT_VALUE |
static String |
ERROR_TYPE_CONTROL_BEING_VALIDATED_IS_NOT_CLIENT_SIDE_READABLE |
static String |
ERROR_TYPE_ERROR_VALIDATING_CONTROL |
protected ValidationMessages |
messages |
static String |
SOURCE_FIELD_NAME_UNDEFINED |
protected String[] |
validateOnClientSideEvents |
childControls, controlContainer, controlDefinitionNode, controlResource, douiContext, hasValidatorSubControls, isValid, locale, ON_EVENT_CLOSE_WINDOW, ON_EVENT_LINK, ON_EVENT_POPUP_LINK_OR_RUNTIME_INTERFACE, ON_EVENT_POPUP_RUNTIME_INTERFACE, ON_EVENT_PROCESS_ACTION, ON_EVENT_RENDER_ACTION, ON_EVENT_REPLACE_INTERFACE, ON_EVENT_SCRIPT, ON_EVENT_VALIDATE, onEventScripts, PARAMETER_TYPE_FIRST_SELECTED, PARAMETER_TYPE_GET_VALUE, parentControl, resources, type, VALIDATION_SELECTED_MANY, VALIDATION_SELECTED_ONE
Constructor and Description |
---|
ValidatorControl() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doServerValidation()
Performs the server validation of the controls for this validator.
|
protected String |
getClientUniqueId() |
IResource |
getControlResource() |
protected IControl |
getControlToValidate() |
Collection<String> |
getControlToValidateIds()
Returns a collection with the ids of the controls to be validated by this validator control.
|
protected String |
getControlToValidateSourceFieldName()
Returns the source field name associated with the control to be validated.
|
protected String[] |
getDefaultMessageParameters() |
protected ValidationMessages |
getDefaultMessages(String errorType) |
String |
getLocalizedErrorMessage()
Returns the error message generated for the control.
|
protected ValidationMessages |
getMessages() |
protected ValidationMessages |
getMessages(String errorType) |
String |
getScriptClear()
Clears the message displayed by this validator.
|
protected String |
getScriptSetMessages(ITransaction portalTransaction) |
protected String |
getScriptSetMessages(String errorType,
ITransaction portalTransaction) |
protected String |
getScriptSetMessages(ValidationMessages validationMessages,
ITransaction portalTransaction) |
String |
getScriptValidate()
Returns the code that needs to be executed on the client side for this validation.
|
String |
getScriptValidateRegistration()
Returns a script that must be placed on the page.
|
String |
getScriptValidationFunctionName()
Returns the name of the client side validation function.
|
protected void |
includeScripts() |
void |
init(Node controlDefinitionNode,
ControlContainer controlContainer,
IControl parentControl) |
boolean |
isClientSideValidationEnabled()
Verify if the parameter ClienteSideValidation is enable.
|
boolean |
isValidateOnlyIfVisible()
Returns if this validator will perform the validation only if the
validated control is visible.
|
boolean |
serverValidate()
Validates all dependent control values on the server side
|
void |
setRenderData() |
appendSubControl, appendSubControls, applyOnEventScripts, buildSubControls, convertToStandardValue, createContainer, disconnect, fixedIdentifierRequired, generateControlId, generateControlIdPrefix, getAdditionalParameters, getAdditionalParameters, getAncestor, getChildControls, getClientEventHandlerScript, getId, getLocale, getName, getNamespace, getParentControl, getPrepareForReadScript, getRenderData, getResources, getRuntimeDefaultSource, getScriptActionValidation, getSourceContext, getStringsToLocalize, getType, getValidationScript, getWindowProperties, getWindowProperties, isRequired, isValid, localize, localizeStrings, processCustomTags, registerOnEventScript, removeChild, removeChildren, resolveVariable, setName, setRuntimeAttributes, setValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getScriptValidationFunctionImplementation
buildSubControls, createContainer, disconnect, getChildControls, getId, getName, getParentControl, getPrepareForReadScript, getRenderData, getResources, getType, isValid, registerOnEventScript, removeChild, removeChildren, setRuntimeAttributes, setValid
public static final String DEFAULT_VALUE
public static final String ERROR_TYPE_CONTROL_BEING_VALIDATED_IS_NOT_CLIENT_SIDE_READABLE
public static final String ERROR_TYPE_ERROR_VALIDATING_CONTROL
public static final String SOURCE_FIELD_NAME_UNDEFINED
protected boolean clientSideValidationEnabled
protected String[] validateOnClientSideEvents
protected ValidationMessages messages
public void init(Node controlDefinitionNode, ControlContainer controlContainer, IControl parentControl) throws PortalException
init
in interface IControl
init
in class Control
PortalException
public boolean serverValidate() throws PortalException
This method does not perform the actual validation. Instead it performs some checks
and calls doServerValidation()
to perform the validation accordingly.
Instead of overriding this method, you should override the doServerValidation()
method.
serverValidate
in interface IValidatorControl
ControlException
PortalException
protected boolean doServerValidation() throws PortalException
PortalException
serverValidate()
public void setRenderData() throws PortalException
setRenderData
in interface IControl
setRenderData
in class Control
PortalException
public String getLocalizedErrorMessage() throws PortalException
IValidatorControl
getLocalizedErrorMessage
in interface IValidatorControl
PortalException
protected void includeScripts() throws PortalException
PortalException
public String getScriptValidate() throws PortalException
IValidatorControl
getScriptValidate
in interface IValidatorControl
PortalException
public String getScriptClear() throws PortalException
IValidatorControl
getScriptClear
in interface IValidatorControl
PortalException
public final String getScriptValidationFunctionName() throws PortalException
IValidatorControl
getScriptValidationFunctionName
in interface IValidatorControl
PortalException
public final String getScriptValidateRegistration() throws PortalException
IValidatorControl
getScriptValidateRegistration
in interface IValidatorControl
PortalException
public IResource getControlResource() throws PortalException
getControlResource
in interface IControl
getControlResource
in class Control
PortalException
public boolean isClientSideValidationEnabled()
IValidatorControl
isClientSideValidationEnabled
in interface IValidatorControl
public boolean isValidateOnlyIfVisible()
protected String getScriptSetMessages(ITransaction portalTransaction) throws PortalException
PortalException
protected String getScriptSetMessages(String errorType, ITransaction portalTransaction) throws PortalException
PortalException
protected String getScriptSetMessages(ValidationMessages validationMessages, ITransaction portalTransaction) throws PortalException
PortalException
protected String getClientUniqueId()
public Collection<String> getControlToValidateIds() throws PortalException
IValidatorControl
getControlToValidateIds
in interface IValidatorControl
PortalException
protected String getControlToValidateSourceFieldName() throws PortalException
PortalException
protected ValidationMessages getMessages() throws PortalException
PortalException
protected ValidationMessages getMessages(String errorType) throws PortalException
PortalException
protected ValidationMessages getDefaultMessages(String errorType) throws PortalException
PortalException
protected String[] getDefaultMessageParameters() throws PortalException
PortalException
protected IControl getControlToValidate() throws PortalException
PortalException
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.