[JAVASERVERFACES_SPEC_PUBLIC-1235] better integration of bv-groups Created: 31/Oct/13  Updated: 08/Feb/16

Status: Open
Project: javaserverfaces-spec-public
Component/s: Validation/Conversion
Affects Version/s: 2.2
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: gerhard_petracek Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


in several cases different bv-groups should get used (in the validation-phase) depending on the triggered action.
(if there are e.g. multiple buttons in the same form which should lead to different bv-constraints.)

also see: https://issues.apache.org/jira/browse/EXTVAL-141

Comment by Ed Burns [ 01/Aug/14 ]

Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

Comment by Manfred Riem [ 01/Aug/14 ]

Setting priority to Major

Comment by muellermi [ 08/Feb/16 ]
  • add an attribute validateGroup="someGroup" to the f:validateBean tag,
    <f:validateBean validationGroups="javax.validation.groups.Default,de.muellerbruehl.jsf23.Email" validateGroup="de.muellerbruehl.jsf23.Email"/>

At the time, the validator is executed (on submit, immediate if ajaxified), do not validate according to the default group, which is default if validateGroup is missing, but according to the given group. If this group performs a multi field validation, create a copy of the model, apply new values (if applicable) and perform the validation.

Comment by muellermi [ 08/Feb/16 ]

Maybe a "validate" attribute for the f:ajax would be a good place to trigger (multi field) group validation.

<h:message for="ageValidator"/>
<h:inputText id="ageDays" value="#


<f:validateBean id="ageValidator" validationGroups="javax.validation.groups.Default,de.muellerbruehl.jsf23.Age"/>
<f:ajax render="msgAgeDays ageValidator" validate="de.muellerbruehl.jsf23.Age"/>
<h:message id="msgAgeDays" for="ageDays"/>

<h:inputText id="ageYears" value="#


<f:validateBean validationGroups="javax.validation.groups.Default,de.muellerbruehl.jsf23.Age"/>
<f:ajax render="msgAgeYears ageValidator" validate="de.muellerbruehl.jsf23.Age"/>
<h:message id="msgAgeYears" for="ageYears"/>

Generated at Sat Dec 10 17:29:52 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.