myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Resolved] (MYFACES-3892) Create a option to execute BeanValidation before JSF-Validation
Date Fri, 04 Mar 2016 02:25:40 GMT

     [ https://issues.apache.org/jira/browse/MYFACES-3892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Leonardo Uribe resolved MYFACES-3892.
-------------------------------------
       Resolution: Fixed
         Assignee: Leonardo Uribe
    Fix Version/s: 2.2.10

I have added a new web config param called org.apache.myfaces.validator.BEAN_BEFORE_JSF_VALIDATION
By default it is set to false, but if it is enabled, the idea is UIInput.getValidators() will
return an array where BeanValidator is always the first one. I think it is the best we can
do, because validateValue() and others methods are overriden by custom components, so this
is the only thing that will ensure BeanValidator is executed over other instances. Thanks
to Rene O for mention the improvement.

> 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
>            Assignee: Leonardo Uribe
>             Fix For: 2.2.10
>
>
> 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.3.4#6332)

Mime
View raw message