javaserverfaces-spec-public
  1. javaserverfaces-spec-public
  2. JAVASERVERFACES_SPEC_PUBLIC-1027

Pre/PostValidateEvent publishing conditions fixed but not documented

    Details

      Description

      JSF 2.0 spec Section 3.2.7.3 says this:

      "... The PreValidateEvent is published immediately before the component gets validated. PostValidate is published after validation has occurred, regardless if the validation was successful or not. If the validation for the component did pass successfully, and the previous value of this component differs from the current value, the ValueChangeEvent is published. ..."

      This is ok. A mail was sent long time ago to notify the change:

      [jsr-314-open] [537-PrePostValidate] RESOLVED (was: Re: [2.1 Spec Review] Pre/PostValidateEvent publishing conditions)

      DG> The only reason I can think of is that UIData is also (potentially,
      DG> anyway) a container of inputs. But so are panels, and they,
      DG> evidently, are excluded. Why?

      EB> No, it does not mean that only those components will deliver those
      EB> events. It means that in the case of components who are iterating
      EB> components, the event must be published before, or after, the child
      EB> component processing. This is true for any components that have
      EB> children. I will revise the documentation to be as follows.
      EB>
      EB> PostValidateEvent
      EB>
      EB> Components with children must publish this event after processing their
      EB> child nodes in processValidators. This is especially important for
      EB> iterating components such as UIData and form components, such as UIForm.
      EB>
      EB> PreValidateEvent
      EB>
      EB> Components with children must publish this before after processing their
      EB> child nodes in processValidators. This is especially important for
      EB> iterating components such as UIData and form components, such as UIForm.

      The problem is the javadoc of UIComponent.processValidators() and other related methods (UIData, UIForm ...) should describe this change, to match the current behavior.

        Issue Links

          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 Critical

          Show
          Manfred Riem added a comment - Setting priority to Critical
          Hide
          Manfred Riem added a comment -

          Applied to 2.3 trunk,

          svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1027, added @see for Pre/PostValidateEvent"
          Sending jsf-api/src/main/java/javax/faces/component/UIComponent.java
          Sending jsf-api/src/main/java/javax/faces/component/UIData.java
          Sending jsf-api/src/main/java/javax/faces/component/UIForm.java
          Transmitting file data ...
          Committed revision 13693.

          Show
          Manfred Riem added a comment - Applied to 2.3 trunk, svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1027 , added @see for Pre/PostValidateEvent" Sending jsf-api/src/main/java/javax/faces/component/UIComponent.java Sending jsf-api/src/main/java/javax/faces/component/UIData.java Sending jsf-api/src/main/java/javax/faces/component/UIForm.java Transmitting file data ... Committed revision 13693.

            People

            • Assignee:
              Manfred Riem
              Reporter:
              lu4242
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: