|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.bind.impl.ValidationContextImpl
public class ValidationContextImpl
the default implementation of validation context
Constructor Summary | |
---|---|
ValidationContextImpl(java.lang.String command,
Property property,
java.util.Map<java.lang.String,Property[]> properties,
BindContext ctx,
boolean valid)
|
Method Summary | |
---|---|
BindContext |
getBindContext()
|
java.lang.String |
getCommand()
get the command that trigger the validation |
java.util.Map<java.lang.String,Property[]> |
getProperties()
get dependent properties that need to be validated. |
java.util.Map<java.lang.String,Property> |
getProperties(java.lang.Object base)
get dependent properties by a base object. |
Property[] |
getProperties(java.lang.String name)
get dependent properties by the property name. |
Property |
getProperty()
get the main property that need to be validated. |
java.lang.Object |
getValidatorArg(java.lang.String key)
Returns validator arg value of the given key This is a shortcut of getBindContext().getValidatorArg() |
boolean |
isLocalValid()
Checks status of local validation context valid or not, it only relates to one validator. |
boolean |
isValid()
Checks status of validation context valid or not, it is a global status of same command, any validator of this validation phase call ValidationContext.setInvalid() will set this false. |
void |
setInvalid()
set invalid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidationContextImpl(java.lang.String command, Property property, java.util.Map<java.lang.String,Property[]> properties, BindContext ctx, boolean valid)
Method Detail |
---|
public BindContext getBindContext()
getBindContext
in interface ValidationContext
public java.lang.String getCommand()
ValidationContext
getCommand
in interface ValidationContext
public java.util.Map<java.lang.String,Property[]> getProperties()
ValidationContext
getProperties
in interface ValidationContext
public Property[] getProperties(java.lang.String name)
ValidationContext
getProperties
in interface ValidationContext
name
- the property name
public java.util.Map<java.lang.String,Property> getProperties(java.lang.Object base)
ValidationContext
Map beanProps = ctx.getProperties(ctx.getProperty().getBase());
Map formProps = ctx.getProperties(ctx.getProperty().getValue());
getProperties
in interface ValidationContext
base
- the base object of properties
public java.lang.Object getValidatorArg(java.lang.String key)
ValidationContext
getBindContext().getValidatorArg()
getValidatorArg
in interface ValidationContext
key
- the key to the value.
public Property getProperty()
ValidationContext
getProperty
in interface ValidationContext
public boolean isValid()
ValidationContext
ValidationContext.setInvalid()
will set this false.
isValid
in interface ValidationContext
Validator
called ValidationContext.setInvalid()
. Note, default is true.public boolean isLocalValid()
ValidationContext
isLocalValid
in interface ValidationContext
Validator
called ValidationContext.setInvalid()
, default is true.public void setInvalid()
ValidationContext
setInvalid
in interface ValidationContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |