Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: Validation/Conversion
    • Labels:
      None

      Description

      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

        Activity

        Hide
        Ed Burns added a comment -

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

        Show
        Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.
        Hide
        Manfred Riem added a comment -

        Setting priority to Major

        Show
        Manfred Riem added a comment - Setting priority to Major
        Hide
        muellermi added a comment -
        • add an attribute validateGroup="someGroup" to the f:validateBean tag,
          e.g.
          <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.

        Show
        muellermi added a comment - add an attribute validateGroup="someGroup" to the f:validateBean tag, e.g. <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.
        Hide
        muellermi added a comment -

        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="#

        {grouper.ageDays}

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

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

        {grouper.ageYears}

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

        Show
        muellermi added a comment - 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="# {grouper.ageDays} "> <f:validateBean id="ageValidator" validationGroups="javax.validation.groups.Default,de.muellerbruehl.jsf23.Age"/> <f:ajax render="msgAgeDays ageValidator" validate="de.muellerbruehl.jsf23.Age"/> </h:inputText> <h:message id="msgAgeDays" for="ageDays"/> <h:inputText id="ageYears" value="# {grouper.ageYears} "> <f:validateBean validationGroups="javax.validation.groups.Default,de.muellerbruehl.jsf23.Age"/> <f:ajax render="msgAgeYears ageValidator" validate="de.muellerbruehl.jsf23.Age"/> </h:inputText> <h:message id="msgAgeYears" for="ageYears"/>

          People

          • Assignee:
            Unassigned
            Reporter:
            gerhard_petracek
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: