If I have many input controls on the form (for each of these input controls there are separate validators - as required, length, etc.), there is a command button that submits the form and calls the action method. The requirement is that - although the values of the input control are, let's say, individually - the combination of these values must be in order to process them together after the form is submitted. Where can I put the code to test them together?
1) Can I add a custom validator for the command button and test the combination together? for example, validate(FacesContext arg0, UIComponent arg1, Object value)but even then I will not have the values of other input controls, except for the correct value / parameter of the command:
2) can I do a combination check in the action method and add check messages with FacesMessage?
or do you suggest any other approach?
Thank you for your time.
source
share