[
https://issues.apache.org/jira/browse/MYFACES-3892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13998722#comment-13998722
]
Leonardo Uribe commented on MYFACES-3892:
-----------------------------------------
In JSF, there is a BeanValidator class that extends from JSF Validator
interface. JSF doesn't make any distinction, so I don't think we can do
something in this case, specially because EditableValueHolder interface doesn't
provide methods to manipulate the ordering how the validators are added. The
code that usually adds BeanValidator is on ComponentTagHandlerDelegate, so
that's the reason why that validator is the last to be executed, because it is
the last to be added, but that's not always the case. You can control the order
how the validation is performed just using f:validateBean in your component:
<h:inputText ... >
<f:validateBean ...>
.... other validators ....
</h:inputText>
> Create a option to execute BeanValidation before JSF-Validation
> ---------------------------------------------------------------
>
> Key: MYFACES-3892
> URL: https://issues.apache.org/jira/browse/MYFACES-3892
> Project: MyFaces Core
> Issue Type: Improvement
> Affects Versions: 2.2.3
> Reporter: Rene O
>
> As stated in this answer: http://stackoverflow.com/a/19835645 BeanValidation
> is executed after JSF-Validation.
> But it would be very useful to have a way to change this behaviour.
> Now you can't decide within jsf-validator wether a component is valid or not
> in terms of BeanValidation
> {code}
> //My JSF-Validator
> //...
> UIInput input = (UIInput) component;
> if (!input.isValid()) {
> return;
> }
> //...my own jsf-validation rules...
> //...
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)