Package de.xima.fc.gui.util
Interface ValidationCallbackMixin
-
- All Known Implementing Classes:
FileListComponent,MultiFileComponent,SingleFileComponent
public interface ValidationCallbackMixinMixin for classes extendingUIComponentthat implementsprocessValidators(context)by first validating the component itself, then processing its children.To use this mixin, you need to override
validateSelf(FacesContext)and provide your validation logic for the component. In addition, you also need to overrideUIComponent.processValidators(FacesContext)to point to the implementation provided by this mixin, e.g.:@Override public void processValidators(FacesContext context) { ValidationCallbackMixin.super.processValidators(context); }This mixin assumes that any class using this mixin is a subclass of
UIComponent.- Since:
- 8.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidprocessValidators(javax.faces.context.FacesContext context)booleanvalidateSelf(javax.faces.context.FacesContext context)Validates the component (and not its children), returning whether it is valid or not.
-
-
-
Method Detail
-
processValidators
default void processValidators(javax.faces.context.FacesContext context)
-
validateSelf
boolean validateSelf(javax.faces.context.FacesContext context)
Validates the component (and not its children), returning whether it is valid or not. You can add Faces messages within this method if validation fails.- Parameters:
context- The current Faces context.- Returns:
- True if this component is valid, false otherwise.
-
-