Validate field and throw exception in JSF, but attach error message to another field?
问题 I have some fields on my page which I want cross-validated. But I don't want error from this validation to be displayed in <h:message> for this fields. If I add validator to any of the fields, and validator throws exception, error is displayed in <h:message> for this field. On the other hand I HAVE TO throw exception if I want to suppress page from submitting. Just displaying some error message is not enough. So I created some hidden field on the form, and attached validator there. This