|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlumis.doui.control.Control
lumis.doui.control.ValidatorControl
public abstract class ValidatorControl
Implements generic validation control behaviour. Validation controls generally would extend this object.
Field Summary | |
---|---|
protected boolean |
clientSideValidationEnabled
|
static java.lang.String |
DEFAULT_VALUE
|
static java.lang.String |
ERROR_TYPE_CONTROL_BEING_VALIDATED_IS_NOT_CLIENT_SIDE_READABLE
|
static java.lang.String |
ERROR_TYPE_ERROR_VALIDATING_CONTROL
|
protected ValidationMessages |
messages
|
static java.lang.String |
SOURCE_FIELD_NAME_UNDEFINED
|
protected java.lang.String[] |
validateOnClientSideEvents
|
Constructor Summary | |
---|---|
ValidatorControl()
|
Method Summary | |
---|---|
protected boolean |
doServerValidation()
Performs the server validation of the controls for this validator. |
protected java.lang.String |
getClientUniqueId()
|
IResource |
getControlResource()
|
protected IControl |
getControlToValidate()
|
java.util.Collection<java.lang.String> |
getControlToValidateIds()
Returns a collection with the ids of the controls to be validated by this validator control. |
protected java.lang.String |
getControlToValidateSourceFieldName()
Returns the source field name associated with the control to be validated. |
protected java.lang.String[] |
getDefaultMessageParameters()
|
protected ValidationMessages |
getDefaultMessages(java.lang.String errorType)
|
protected ValidationMessages |
getMessages()
|
protected ValidationMessages |
getMessages(java.lang.String errorType)
|
java.lang.String |
getScriptClear()
Clears the message displayed by this validator. |
protected java.lang.String |
getScriptSetMessages(ITransaction portalTransaction)
|
protected java.lang.String |
getScriptSetMessages(java.lang.String errorType,
ITransaction portalTransaction)
|
protected java.lang.String |
getScriptSetMessages(ValidationMessages validationMessages,
ITransaction portalTransaction)
|
java.lang.String |
getScriptValidate()
Returns the code that needs to be executed on the client side for this validation. |
java.lang.String |
getScriptValidateRegistration()
Returns a script that must be placed on the page. |
java.lang.String |
getScriptValidationFunctionName()
Returns the name of the client side validation function. |
protected void |
includeScripts()
|
void |
init(org.w3c.dom.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()
|
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.IValidatorControl |
---|
getScriptValidationFunctionImplementation |
Methods inherited from interface lumis.doui.control.IControl |
---|
buildSubControls, createContainer, disconnect, getChildControls, getId, getParentControl, getPrepareForReadScript, getRenderData, getResources, getType, isValid, registerOnEventScript, removeChild, removeChildren, setRuntimeAttributes, setValid |
Field Detail |
---|
public static final java.lang.String DEFAULT_VALUE
public static final java.lang.String ERROR_TYPE_CONTROL_BEING_VALIDATED_IS_NOT_CLIENT_SIDE_READABLE
public static final java.lang.String ERROR_TYPE_ERROR_VALIDATING_CONTROL
public static final java.lang.String SOURCE_FIELD_NAME_UNDEFINED
protected boolean clientSideValidationEnabled
protected java.lang.String[] validateOnClientSideEvents
protected ValidationMessages messages
Constructor Detail |
---|
public ValidatorControl()
Method Detail |
---|
public void init(org.w3c.dom.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
protected void includeScripts() throws PortalException
PortalException
public java.lang.String getScriptValidate() throws PortalException
IValidatorControl
public java.lang.String getScriptClear() throws PortalException
IValidatorControl
getScriptClear
in interface IValidatorControl
PortalException
public final java.lang.String getScriptValidationFunctionName() throws PortalException
IValidatorControl
public final java.lang.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 java.lang.String getScriptSetMessages(ITransaction portalTransaction) throws PortalException
PortalException
protected java.lang.String getScriptSetMessages(java.lang.String errorType, ITransaction portalTransaction) throws PortalException
PortalException
protected java.lang.String getScriptSetMessages(ValidationMessages validationMessages, ITransaction portalTransaction) throws PortalException
PortalException
protected java.lang.String getClientUniqueId()
public java.util.Collection<java.lang.String> getControlToValidateIds() throws PortalException
IValidatorControl
getControlToValidateIds
in interface IValidatorControl
PortalException
protected java.lang.String getControlToValidateSourceFieldName() throws PortalException
PortalException
protected ValidationMessages getMessages() throws PortalException
PortalException
protected ValidationMessages getMessages(java.lang.String errorType) throws PortalException
PortalException
protected ValidationMessages getDefaultMessages(java.lang.String errorType) throws PortalException
PortalException
protected java.lang.String[] getDefaultMessageParameters() throws PortalException
PortalException
protected IControl getControlToValidate() throws PortalException
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |