Class AbstractInlineEditorValidatableContainer<T>
- java.lang.Object
-
- com.hybris.cockpitng.editor.extendedmultireferenceeditor.validate.AbstractInlineEditorValidatableContainer<T>
-
- All Implemented Interfaces:
ValidatableContainer
- Direct Known Subclasses:
InlineEditorValidatableContainer,RowInlineEditorValidatableContainer
public abstract class AbstractInlineEditorValidatableContainer<T> extends java.lang.Object implements ValidatableContainer
An abstract validation container that's dedicated forDefaultExtendedMultiReferenceEditor.Note: Validation feature inside aforementioned editor is enabled only when inline editing is activated.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanpreventBroadcastValidationChange
-
Constructor Summary
Constructors Constructor Description AbstractInlineEditorValidatableContainer(org.zkoss.zk.ui.Component container, EditorState<T> editorState)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ValidationFocusTransferHandlercreateFocusTransferHandler()org.zkoss.zk.ui.ComponentgetContainer()Container componentjava.lang.StringgetCurrentObjectPath(java.lang.String path)Alters provided path (that comes from violation) so that is relative to current objectValidationResultgetCurrentValidationResult(java.lang.String path)Gets validation results of container related to provided path (relative to container).EditorState<T>getEditorState()ValidationFocusTransferHandlergetFocusTransfer()Gets an object that is able to transfer focus between fields on basis of their paths.protected abstract ValidationResultgetRootValidationResult()org.zkoss.zul.WindowgetValidationResultPopup()booleanreactOnValidationChange(java.lang.String path)Checks whether this validatable container is able to process validation result change for given path.voidsetPreventBroadcastValidationChange(boolean preventBroadcastValidationChange)Prevents validation container to not delegate validation change further.voidsetValidationResultPopup(org.zkoss.zul.Window validationResultPopup)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hybris.cockpitng.components.validation.ValidatableContainer
addValidationObserver, addValidationObserver, getCurrentObject, getCurrentValidationResult, isRootPath, reactOnValidationChange, removeValidationObserver
-
-
-
-
Constructor Detail
-
AbstractInlineEditorValidatableContainer
public AbstractInlineEditorValidatableContainer(org.zkoss.zk.ui.Component container, EditorState<T> editorState)
-
-
Method Detail
-
createFocusTransferHandler
protected abstract ValidationFocusTransferHandler createFocusTransferHandler()
-
getCurrentObjectPath
public java.lang.String getCurrentObjectPath(java.lang.String path)
Description copied from interface:ValidatableContainerAlters provided path (that comes from violation) so that is relative to current object- Specified by:
getCurrentObjectPathin interfaceValidatableContainer- Parameters:
path- violation path- Returns:
- path relative to validated object, empty string if path points directly to validated object or
nullif path does not match any validated objects
-
getFocusTransfer
public ValidationFocusTransferHandler getFocusTransfer()
Description copied from interface:ValidatableContainerGets an object that is able to transfer focus between fields on basis of their paths.- Specified by:
getFocusTransferin interfaceValidatableContainer- Returns:
- focus transfer
-
getRootValidationResult
protected abstract ValidationResult getRootValidationResult()
-
getCurrentValidationResult
public ValidationResult getCurrentValidationResult(java.lang.String path)
Description copied from interface:ValidatableContainerGets validation results of container related to provided path (relative to container).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.
- Specified by:
getCurrentValidationResultin interfaceValidatableContainer- Returns:
- validation results found or
ValidationResult.EMPTYif no violations found for specified path
-
setPreventBroadcastValidationChange
public void setPreventBroadcastValidationChange(boolean preventBroadcastValidationChange)
Description copied from interface:ValidatableContainerPrevents validation container to not delegate validation change further.- Specified by:
setPreventBroadcastValidationChangein interfaceValidatableContainer
-
getContainer
public org.zkoss.zk.ui.Component getContainer()
Description copied from interface:ValidatableContainerContainer component- Specified by:
getContainerin interfaceValidatableContainer- Returns:
- component containing fields
-
getEditorState
public EditorState<T> getEditorState()
-
reactOnValidationChange
public boolean reactOnValidationChange(java.lang.String path)
Description copied from interface:ValidatableContainerChecks whether this validatable container is able to process validation result change for given path.- Specified by:
reactOnValidationChangein interfaceValidatableContainer- Returns:
- true if this validatable container can process validation result change
-
getValidationResultPopup
public org.zkoss.zul.Window getValidationResultPopup()
-
setValidationResultPopup
public void setValidationResultPopup(org.zkoss.zul.Window validationResultPopup)
-
-