public interface ValidatableContainer
| Modifier and Type | Method and Description |
|---|---|
void |
addValidationObserver(String key,
ValueObserver observer)
Registers a new observer for validation results of container for specified path and all its children
|
void |
addValidationObserver(ValueObserver observer)
Registers a new observer for validation results of container
|
org.zkoss.zk.ui.Component |
getContainer()
Container component
|
Object |
getCurrentObject(String path)
Gets a full object that was validated for specified violation path
|
String |
getCurrentObjectPath(String path)
Alters provided path (that comes from violation) so that is relative to current object
|
default ValidationResult |
getCurrentValidationResult()
Gets current validation results of container (relative to container).
|
ValidationResult |
getCurrentValidationResult(String path)
Gets validation results of container related to provided path (relative to container).
|
ValidationFocusTransferHandler |
getFocusTransfer()
Gets an object that is able to transfer focus between fields on basis of their paths.
|
boolean |
isRootPath(String path)
Checks whether provided path should be treated as root path.
|
default boolean |
reactOnValidationChange()
Checks whether this validatable container is able to process validation result change for root path.
|
boolean |
reactOnValidationChange(String path)
Checks whether this validatable container is able to process validation result change for given path.
|
void |
removeValidationObserver(ValueObserver observer)
Unregisters a new observer for validation results of container
|
void |
setPreventBroadcastValidationChange(boolean preventBroadcastValidationChange)
Prevents validation container to not delegate validation change further.
|
org.zkoss.zk.ui.Component getContainer()
Object getCurrentObject(String path)
path - path of violationnull if no object matches provided pathString getCurrentObjectPath(String path)
path - violation pathnull if path does not match any validated objectsboolean isRootPath(String path)
Any validation path that matches containers restrictions, yet does not specify any particular attribute/qualifier (i.e. points exactly to one of validated objects) should be considered as root path. In general, if a path is validated by container or is a parent of validated path, but does not point any particular attribute, then it is a root path. Empty string should always be considered as root path, cause they are always a kind of parent of validated path.
true if path is validated by container (or is a parent path of such) and does not point any
attributeValidationFocusTransferHandler getFocusTransfer()
void addValidationObserver(ValueObserver observer)
observer - observer to be notifiedvoid addValidationObserver(String key, ValueObserver observer)
key - validation path to be observedobserver - observer to be notifiedvoid removeValidationObserver(ValueObserver observer)
observer - observer not to be notifiedValidationResult getCurrentValidationResult(String path)
Returned container may be editable and notify listeners about changes. If a returned container is a wrapper of other container, then any changes made to the wrapper should be propagated to wrapped one and all listeners should be notified. It is not sure that changes made to wrapped one will be propagated to the wrapper. Also notifications of wrapped container may not be transferred to listeners of a wrapper.
ValidationResult.EMPTY if no violations found for specified pathdefault ValidationResult getCurrentValidationResult()
Returned container may be editable and notify listeners about changes. If a returned container is a wrapper of other container, then any changes made to the wrapper should be propagated to wrapped one and all listeners should be notified. It is not sure that changes made to wrapped one will be propagated to the wrapper. Also notifications of wrapped container may not be transferred to listeners of a wrapper.
ValidationResult.EMPTY if no violations found for specified pathboolean reactOnValidationChange(String path)
default boolean reactOnValidationChange()
void setPreventBroadcastValidationChange(boolean preventBroadcastValidationChange)
preventBroadcastValidationChange - Copyright © 2018. All rights reserved.