[OmniFaces utilities] The
validateHasNoChildren()
method validates if the given component has no children.Method:
We can
easily use this method in a custom validator, component, managed bean etc. Per
example, you can check if a form has children:
try {
Components.validateHasNoChildren(myform);
} catch
(IllegalArgumentException e) {
System.out.println("This form has
children !" + e.getMessage());
}
A possible
exception message will be:
Niciun comentariu :
Trimiteți un comentariu