public class DateCompareValidatorControl extends ValidatorControl
The XML structure for declaring this control is:
<control type="lum_dateCompareValidator" controlToValidateId="" compareToControlId="" operator="" dateFormat="" timeFormat="" />
controlToValidateId: This attribute must contain the Id of the Doui Control that you want to validate. It can be ommited if the validation control is declard within the control you want to validade.
compareToControlId: This attribute specifies the Id of the Doui Control you want to compare the value of the control being validated.
operator: equal, lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual.
dateFormat and timeFormat: specifies the date and time format. If not declared, will use the default date format for the current language locale being used.
Generates client side and server side validation that compares date values of two controls. The comparison may be either equal, lessThan, lessThanOrEqual, greaterThan or greaterThanOrEqual.
<control:lum_dateCompareValidator controlToValidateId="endDate" compareToControlId="startDate" operator="greaterThanOrEqual" />
xml data available for xsl rendering:
<control id="8A488A03115BCABC01115BD4864700A4" type="lum_dateDataTypeValidator">
<script><!-- validation javascript --></script>
<data>
<clientUniqueId>Form_8A488A031150E33501115107712D01FC8A488A03115BCABC01115BD4864700A4</clientUniqueId>
</data>
</control>
Modifier and Type | Field and Description |
---|---|
protected String |
compareToArgument |
protected static String |
CONTROL_PARAMETER_DATE_FORMAT_PATTERN |
protected static String |
CONTROL_PARAMETER_TIME_FORMAT_PATTERN |
protected String |
controlToValidateId |
protected String |
dateFormat |
protected String |
operatorType |
protected SimpleDateFormat |
sdfDate |
protected SimpleDateFormat |
sdfDateTime |
protected String |
timeFormat |
static String |
TYPE_OPERATOR_EQUAL |
static String |
TYPE_OPERATOR_GREATER_THAN |
static String |
TYPE_OPERATOR_GREATER_THAN_OR_EQUAL |
static String |
TYPE_OPERATOR_LESS_THAN |
static String |
TYPE_OPERATOR_LESS_THAN_OR_EQUAL |
clientSideValidationEnabled, DEFAULT_VALUE, ERROR_TYPE_CONTROL_BEING_VALIDATED_IS_NOT_CLIENT_SIDE_READABLE, ERROR_TYPE_ERROR_VALIDATING_CONTROL, messages, SOURCE_FIELD_NAME_UNDEFINED, 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 |
---|
DateCompareValidatorControl() |
Modifier and Type | Method and Description |
---|---|
boolean |
doServerValidation()
Performs the server validation of the controls for this validator.
|
IResource |
getControlResource() |
protected String[] |
getDefaultMessageParameters() |
protected ValidationMessages |
getDefaultMessages(String errorType) |
String |
getScriptValidationFunctionImplementation()
Returns the client side code that must be placed in a client side function to perform the
validation
|
protected void |
includeScripts() |
void |
init(Node controlDefinitionNode,
ControlContainer controlContainer,
IControl parentControl) |
getClientUniqueId, getControlToValidate, getControlToValidateIds, getControlToValidateSourceFieldName, getLocalizedErrorMessage, getMessages, getMessages, getScriptClear, getScriptSetMessages, getScriptSetMessages, getScriptSetMessages, getScriptValidate, getScriptValidateRegistration, getScriptValidationFunctionName, isClientSideValidationEnabled, isValidateOnlyIfVisible, serverValidate, 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
buildSubControls, createContainer, disconnect, getChildControls, getId, getName, getParentControl, getPrepareForReadScript, getRenderData, getResources, getType, isValid, registerOnEventScript, removeChild, removeChildren, setRuntimeAttributes, setValid
public static String TYPE_OPERATOR_EQUAL
public static String TYPE_OPERATOR_LESS_THAN
public static String TYPE_OPERATOR_LESS_THAN_OR_EQUAL
public static String TYPE_OPERATOR_GREATER_THAN
public static String TYPE_OPERATOR_GREATER_THAN_OR_EQUAL
protected static final String CONTROL_PARAMETER_DATE_FORMAT_PATTERN
protected static final String CONTROL_PARAMETER_TIME_FORMAT_PATTERN
protected String dateFormat
protected String timeFormat
protected String operatorType
protected String controlToValidateId
protected String compareToArgument
protected SimpleDateFormat sdfDateTime
protected SimpleDateFormat sdfDate
public void init(Node controlDefinitionNode, ControlContainer controlContainer, IControl parentControl) throws PortalException
init
in interface IControl
init
in class ValidatorControl
PortalException
public boolean doServerValidation() throws PortalException
ValidatorControl
doServerValidation
in class ValidatorControl
PortalException
ValidatorControl.serverValidate()
protected ValidationMessages getDefaultMessages(String errorType) throws ControlException, PortalException
getDefaultMessages
in class ValidatorControl
ControlException
PortalException
protected String[] getDefaultMessageParameters() throws PortalException
getDefaultMessageParameters
in class ValidatorControl
PortalException
protected void includeScripts() throws ControlException, PortalException
includeScripts
in class ValidatorControl
ControlException
PortalException
public String getScriptValidationFunctionImplementation() throws PortalException
IValidatorControl
PortalException
public IResource getControlResource() throws PortalException
getControlResource
in interface IControl
getControlResource
in class ValidatorControl
PortalException
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.