|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.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 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
|
Constructor Summary | |
---|---|
ValidatorControl()
|
Method Summary | |
---|---|
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)
|
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()
|
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 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
Constructor Detail |
---|
public ValidatorControl()
Method Detail |
---|
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
protected void includeScripts() throws PortalException
PortalException
public String getScriptValidate() throws PortalException
IValidatorControl
public String getScriptClear() throws PortalException
IValidatorControl
getScriptClear
in interface IValidatorControl
PortalException
public final String getScriptValidationFunctionName() throws PortalException
IValidatorControl
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |