In JSFs validation phase, in what order are input fields validated?
What I thought about trying is the following: I have a group of input fields that may pass or fail conversion/validation. Also, I would like to have some input with a custom validator that produces a different outcome depending on whether all other fields passed validation or not. I can check the FacesContext for any previous messages, but I would have to make sure that this custom converter is called after all other fields have been checked, hence the above question. Is it simply the order in which they are defined in the Facelets-Page? If so, would this order be guaranteed?
Basically, yes. The component tree will be processed recursively "the usual way". For each component first the component itself will be processed and then each of its child components in sequence.
Yes. This is stated in the JSF 2.0 specification:
The custom converter should thus be referenced by the last component or a "stub"
<h:inputHidden>component after all of the desired components. The desired components can be passed through by component bindings. See also this related answer: JSF doesn't support cross-field validation, is there a workaround?As a completely different alternative, you could consider wrapping the whole thing in a composite.