2010/10/19 Leonardo Uribe <span dir="ltr">&lt;<a href="mailto:lu4242@gmail.com">lu4242@gmail.com</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
Hi<br><br><div class="gmail_quote">2010/10/19 Andy Schwartz <span dir="ltr">&lt;<a href="mailto:andy.schwartz@oracle.com" target="_blank">andy.schwartz@oracle.com</a>&gt;</span><div class="im"><br><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; ">
The following text was added to the Pre/PostValdiateEvent API doc:<br><br><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; ">
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.<br>
<br>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).<br></blockquote>
<br>Does this mean that only input, UIData and UIForm components will deliver these events?<br><br></blockquote></div><div><br>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?<br>
</div></div></blockquote><div><br></div><div>The only reason I can think of is that UIData is also (potentially, anyway) a container of inputs. But so are panels, and they, evidently, are excluded. Why?</div><div><br></div>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div class="gmail_quote"><div> </div><div class="im"><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; ">
If so, some concerns about this:<br><br>1.  Mojarra 2.0 delivered these events for all components.<br>2.  The Mojarra trunk still does this (see UIComponentBase.processValidators()).<br>3.  This prevents mutti-component validation where a listener is registered on an arbitrary ancestor component.<br>
<br>For an example of #3, see the &quot;Multi-Component Validation&quot; section of Core JavaServer Faces, 3rd ed:<br><br><a href="http://my.safaribooksonline.com/9780137013968/331#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODAxMzcwMTM5NjgvMzMx" target="_blank">http://my.safaribooksonline.com/9780137013968/331#X2ludGVybmFsX0ZsYXNoUmVhZGVyP3htbGlkPTk3ODAxMzcwMTM5NjgvMzMx</a><br>
<br>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.</blockquote></div></div></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; ">
<font color="#888888"><br></font></blockquote></div><div><br>Yes, that code does not going to work. <br></div></div></blockquote><div><br></div><div>At first this made sense to me: only inputs, which are the only components that need to be validated, should fire pre/post validate events. However, looking at mojarra, we invoke processValidations() for every component, regardless of whether it’s an input or not.</div>
<div><br></div><div>It seems to that if we are going to call processValidations() on a component, we should fire the associated events.</div><div><br></div><div><br></div><div>david</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div class="gmail_quote"><div><br>Leonar</div></div></blockquote></div>