lumis.doui.control.validator
Class IntegerDataTypeValidatorControl

Package class diagram package IntegerDataTypeValidatorControl
java.lang.Object
  extended by lumis.doui.control.Control
      extended by lumis.doui.control.ValidatorControl
          extended by lumis.doui.control.validator.IntegerDataTypeValidatorControl
All Implemented Interfaces:
VariableResolver, IControl, IValidatorControl

public class IntegerDataTypeValidatorControl
extends ValidatorControl

Generates client side and server side validation that verifies that a control value if provided is a valid integer.

Example use:

<control:lum_integerDataTypeValidator minimumValue="1" maximumValue="1000"/> xml data available for xsl rendering: <control id="8A488A0311DCC4930111DD01078D08EB" maximumValue="1000" minimumValue="1" type="lum_integerDataTypeValidator"> <script><!-- validation javascript --></script> <data> <clientUniqueId>Form_8A488A0311DCC4930111DD00A21208B58A488A0311DCC4930111DD01078D08EB</clientUniqueId> </data> </control> Class responsible for validating integer values on DOUI controls.

Since:
4.0.0

Field Summary
 
Fields inherited from class lumis.doui.control.ValidatorControl
clientSideValidationEnabled, DEFAULT_VALUE, ERROR_TYPE_CONTROL_BEING_VALIDATED_IS_NOT_CLIENT_SIDE_READABLE, ERROR_TYPE_ERROR_VALIDATING_CONTROL, messages, SOURCE_FIELD_NAME_UNDEFINED, validateOnClientSideEvents
 
Fields inherited from class lumis.doui.control.Control
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, onEventScripts, PARAMETER_TYPE_FIRST_SELECTED, PARAMETER_TYPE_GET_VALUE, parentControl, resources, type, VALIDATION_SELECTED_MANY, VALIDATION_SELECTED_ONE
 
Constructor Summary
IntegerDataTypeValidatorControl()
           
 
Method Summary
 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)
           
 
Methods inherited from class lumis.doui.control.ValidatorControl
getClientUniqueId, getControlToValidate, getControlToValidateIds, getControlToValidateSourceFieldName, getMessages, getMessages, getScriptClear, getScriptSetMessages, getScriptSetMessages, getScriptSetMessages, getScriptValidate, getScriptValidateRegistration, getScriptValidationFunctionName, isClientSideValidationEnabled, isValidateOnlyIfVisible, serverValidate, setRenderData
 
Methods inherited from class lumis.doui.control.Control
appendSubControl, appendSubControls, applyOnEventScripts, buildSubControls, convertToStandardValue, createContainer, disconnect, fixedIdentifierRequired, generateControlId, getAdditionalParameters, getAdditionalParameters, getAncestor, getChildControls, getClientEventHandlerScript, getId, getLocale, getNamespace, getParentControl, getPrepareForReadScript, getRenderData, getResources, getRuntimeDefaultSource, getScriptActionValidation, getScriptGetValues, getScriptGetValuesFunctionImplementation, getScriptGetValuesFunctionName, getScriptGetValuesRegistration, getSourceContext, getStringsToLocalize, getType, getValidationScript, isValid, localize, localizeStrings, processCustomTags, registerOnEventScript, removeChild, removeChildren, resolveVariable, setRuntimeAttributes, setValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lumis.doui.control.IControl
buildSubControls, createContainer, disconnect, getChildControls, getId, getParentControl, getPrepareForReadScript, getRenderData, getResources, getType, isValid, registerOnEventScript, removeChild, removeChildren, setRuntimeAttributes, setValid
 

Constructor Detail

IntegerDataTypeValidatorControl

public IntegerDataTypeValidatorControl()
Method Detail

init

public void init(Node controlDefinitionNode,
                 ControlContainer controlContainer,
                 IControl parentControl)
          throws PortalException
Specified by:
init in interface IControl
Overrides:
init in class ValidatorControl
Throws:
PortalException

doServerValidation

public boolean doServerValidation()
                           throws PortalException
Description copied from class: ValidatorControl
Performs the server validation of the controls for this validator.

Overrides:
doServerValidation in class ValidatorControl
Returns:
false if the validation failed, true otherwise.
Throws:
PortalException
See Also:
ValidatorControl.serverValidate()

includeScripts

protected void includeScripts()
                       throws PortalException
Overrides:
includeScripts in class ValidatorControl
Throws:
PortalException

getScriptValidationFunctionImplementation

public String getScriptValidationFunctionImplementation()
                                                 throws PortalException
Description copied from interface: IValidatorControl
Returns the client side code that must be placed in a client side function to perform the validation

Returns:
a String.
Throws:
PortalException

getDefaultMessages

protected ValidationMessages getDefaultMessages(String errorType)
                                         throws PortalException
Overrides:
getDefaultMessages in class ValidatorControl
Throws:
PortalException

getDefaultMessageParameters

protected String[] getDefaultMessageParameters()
                                        throws PortalException
Overrides:
getDefaultMessageParameters in class ValidatorControl
Throws:
PortalException

getControlResource

public IResource getControlResource()
                             throws PortalException
Specified by:
getControlResource in interface IControl
Overrides:
getControlResource in class ValidatorControl
Throws:
PortalException


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.