|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 ValidationContextpublic java.lang.String getCommand()
ValidationContext
getCommand in interface ValidationContextpublic java.util.Map<java.lang.String,Property[]> getProperties()
ValidationContext
getProperties in interface ValidationContextpublic Property[] getProperties(java.lang.String name)
ValidationContext
getProperties in interface ValidationContextname - 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 ValidationContextbase - the base object of properties
public java.lang.Object getValidatorArg(java.lang.String key)
ValidationContextgetBindContext().getValidatorArg()
getValidatorArg in interface ValidationContextkey - the key to the value.
public Property getProperty()
ValidationContext
getProperty in interface ValidationContextpublic boolean isValid()
ValidationContextValidationContext.setInvalid() will set this false.
isValid in interface ValidationContextValidator called ValidationContext.setInvalid(). Note, default is true.public boolean isLocalValid()
ValidationContext
isLocalValid in interface ValidationContextValidator 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 | |||||||||