lumis.doui.control.validator
Class RequiredValueWhenVisibleValidatorControl
java.lang.Object
lumis.doui.control.Control
lumis.doui.control.ValidatorControl
lumis.doui.control.validator.RequiredValueValidatorControl
lumis.doui.control.validator.RequiredValueWhenVisibleValidatorControl
- All Implemented Interfaces:
- VariableResolver, IControl, IValidatorControl
public class RequiredValueWhenVisibleValidatorControl
- extends RequiredValueValidatorControl
This is a client side only validating control. If the controle is visible do
the required value validation, else do not validate.
- Since:
- 4.0.3
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_SCRIPT, onEventScripts, PARAMETER_TYPE_FIRST_SELECTED, PARAMETER_TYPE_GET_VALUE, parentControl, resources, type, VALIDATION_SELECTED_MANY, VALIDATION_SELECTED_ONE |
Method Summary |
boolean |
doServerValidation()
Does not perform validation on the server side. |
String |
getScriptValidationFunctionImplementation()
The script validation client side function calls the method
LumisIsControlVisible passing the id of the control that is being
validated. |
protected void |
includeScripts()
Includes LumisDouiRequiredValueWhenVisibleValidator.js script which
implements the LumisIsControlVisible(controlElement) client side function
that returns true or false depending on the visibility of the given
validated control. |
Methods inherited from class lumis.doui.control.ValidatorControl |
getClientUniqueId, getControlToValidate, getControlToValidateIds, getControlToValidateSourceFieldName, getDefaultMessageParameters, getMessages, getMessages, getScriptClear, getScriptSetMessages, getScriptSetMessages, getScriptSetMessages, getScriptValidate, getScriptValidateRegistration, getScriptValidationFunctionName, init, 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 |
RequiredValueWhenVisibleValidatorControl
public RequiredValueWhenVisibleValidatorControl()
doServerValidation
public boolean doServerValidation()
throws ControlException,
PortalException
- Does not perform validation on the server side. This is a client side
only validation control. Currently there is no way to detect whether a
control is visible or not on the server side.
- Overrides:
doServerValidation
in class RequiredValueValidatorControl
- Returns:
- false if the validation failed, true otherwise.
- Throws:
ControlException
PortalException
- See Also:
ValidatorControl.serverValidate()
includeScripts
protected void includeScripts()
throws ControlException,
PortalException
- Includes LumisDouiRequiredValueWhenVisibleValidator.js script which
implements the LumisIsControlVisible(controlElement) client side function
that returns true or false depending on the visibility of the given
validated control.
- Overrides:
includeScripts
in class ValidatorControl
- Throws:
ControlException
PortalException
getScriptValidationFunctionImplementation
public String getScriptValidationFunctionImplementation()
throws ControlException,
PortalException
- The script validation client side function calls the method
LumisIsControlVisible passing the id of the control that is being
validated. If this method returns false, this signifies that the control
is not visible and there is no need to continue validation. If true the
regular required value validation is performed.
- Specified by:
getScriptValidationFunctionImplementation
in interface IValidatorControl
- Overrides:
getScriptValidationFunctionImplementation
in class RequiredValueValidatorControl
- Returns:
- a String.
- Throws:
PortalException
ControlException
Lumisportal 5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.