Graph validator component also allows to register Hibernate Validators for the
input components. As opposite to beanValidator that should be
a child component for the input to be validated this component should wrap
some subtree with inputs. As a result validator for every input in this
subtree will be added to the component.
Look through the next simple example:
There is one additional useful feature in Graph Validator component.
Value attribute could be defined with some value binding to bean. And the
bean properties will be validated again after model update.
Simple example of such kind of usage is shown below. Just write some activities of the day
and the time you spend on each one in a day.
In this case only properties of each passTime(values of the inputs) is validated
at validation phase.
But after the model is updated (Each explicit passtime was validated ok) all the
properties including "TotalTime" are validated again. And total validation could
fail if the sum of the hours in a day more than 24.