[jsr-314-open-mirror] [jsr-314-open] [2.1 Spec Review] Pre/PostValidateEvent publishing conditions

Leonardo Uribe lu4242 at gmail.com
Tue Oct 19 18:00:10 EDT 2010


Hi

2010/10/19 Andy Schwartz <andy.schwartz at oracle.com>

> The following text was added to the Pre/PostValdiateEvent API doc:
>
>  When an instance of this event is passed to
>> SystemEventListener.processEvent(javax.faces.event.SystemEvent) or
>> ComponentSystemEventListener.processEvent(javax.faces.event.ComponentSystemEvent),
>> the listener implementation may assume that the source of this event
>> instance is the UIComponent instance that is that has just been validated.
>>
>> Note that iterating components such as UIData, and form components such as
>> UIForm must publish this event after processing their children nodes in
>> UIComponent.processValidators(javax.faces.context.FacesContext).
>>
>
> Does this mean that only input, UIData and UIForm components will deliver
> these events?
>
>
I was not aware that UIData deliver these events. In my understanding it has
sense to UIForm deliver these events, because it is the container of UIInput
components, but why UIData?


> If so, some concerns about this:
>
> 1.  Mojarra 2.0 delivered these events for all components.
> 2.  The Mojarra trunk still does this (see
> UIComponentBase.processValidators()).
> 3.  This prevents mutti-component validation where a listener is registered
> on an arbitrary ancestor component.
>
> For an example of #3, see the "Multi-Component Validation" section of Core
> JavaServer Faces, 3rd ed:
>
>
> http://my.safaribooksonline.com/9780137013968/331#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODAxMzcwMTM5NjgvMzMx
>
> Note that the PostValidateEvent listener is registered on an h:panelGrid.
>  With the new addition to the specification, it seems that this is no longer
> supported.
>
>
Yes, that code does not going to work.

Leonardo


> Andy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20101019/ad1468a0/attachment-0002.html 


More information about the jsr-314-open-mirror mailing list