public interface ValidationRenderer
| Modifier and Type | Method and Description |
|---|---|
void |
cleanAllValidationCss(org.zkoss.zk.ui.HtmlBasedComponent container)
Removes all css classes from specified component that are related to validation violation
|
org.zkoss.zk.ui.Component |
createValidationMessageBtn(ValidationResult validations)
Creates an icon indicating violation severity level.
|
org.zkoss.zk.ui.Component |
createValidationMessageBtn(ValidationResult validations,
boolean validationExpanded)
Creates an icon indicating violation severity level.
|
org.zkoss.zul.Listbox |
createValidationViolationsList(ValidatableContainer container)
Creates a list, that displays all violations from provided validation result
|
org.zkoss.zul.Window |
createValidationViolationsPopup(ValidatableContainer container,
org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
Creates a popup, that displays all violations from provided validation result.
|
String |
getIconStyleClass(ValidationSeverity severity)
Gets a css class of icon representing provided severity level
|
String |
getLabel(Object object,
String path)
Gets a label for violated path of specified object
|
String |
getSeverityStyleClass(ValidationSeverity severity)
Gets a css class for components to be marked with provided severity level
|
org.zkoss.zul.Listbox createValidationViolationsList(ValidatableContainer container)
container - container that will be validatedcreateValidationViolationsPopup(ValidatableContainer, EventListener)org.zkoss.zul.Window createValidationViolationsPopup(ValidatableContainer container, org.zkoss.zk.ui.event.EventListener<org.zkoss.zk.ui.event.Event> listener)
Popup also implements possibility of closing, confirming warnings, etc.
container - container that will be validatedlistener - listener for confirmation - listener is notified after user clicks close/
confirm button and a window is hiddencreateValidationViolationsList(ValidatableContainer),
Events.ON_OKorg.zkoss.zk.ui.Component createValidationMessageBtn(ValidationResult validations, boolean validationExpanded)
validations - violations to be represented by buttonvalidationExpanded - determines whether validation info popup is displayed on initorg.zkoss.zk.ui.Component createValidationMessageBtn(ValidationResult validations)
onClick event to icon,
to show details of violation in popup.validations - violations to be represented by buttonString getLabel(Object object, String path)
object - object being validatedpath - violated pathString getIconStyleClass(ValidationSeverity severity)
severity - severity level to be representedString getSeverityStyleClass(ValidationSeverity severity)
severity - severity level to be representedvoid cleanAllValidationCss(org.zkoss.zk.ui.HtmlBasedComponent container)
container - component to be clearedCopyright © 2018. All rights reserved.