Hi Martin<br><br>Yes, it is necessary to compare the full client id. Really that <br>part of the algorithm is the same as UIComponent.invokeOnComponent,<br>but without propagate the callback to the children.<br><br>regards,<br>
<br>Leonardo<br><br><div class="gmail_quote">2010/4/25 Martin Marinschek <span dir="ltr">&lt;<a href="mailto:mmarinschek@apache.org">mmarinschek@apache.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Leonardo,<br>
<br>
yes, certainly this needs to be doable as well. For performance<br>
reasons - is it really necessary to compare the full client-id?<br>
<br>
best regards,<br>
<br>
Martin<br>
<div><div></div><div class="h5"><br>
On Fri, Apr 23, 2010 at 7:52 PM, Leonardo Uribe &lt;<a href="mailto:lu4242@gmail.com">lu4242@gmail.com</a>&gt; wrote:<br>
&gt; Hi<br>
&gt;<br>
&gt; Looking some jsf 2.0 code, I notice the current algorithm of<br>
&gt; UIData.invokeOnComponent cannot handle the case when the target is a<br>
&gt; UIColumn instance and no rowIndex is on clientId. Is that ok?<br>
&gt;<br>
&gt; Checking the new visit tree api, UIData.visitTree cleary says:<br>
&gt;<br>
&gt; &quot;....If this component has children, for each UIColumn child:<br>
&gt;<br>
&gt; Call VisitContext.invokeVisitCallback(javax.faces.component.UIComponent,<br>
&gt; javax.faces.component.visit.VisitCallback) on that UIColumn instance. If<br>
&gt; such a call returns true, terminate visiting and return true from this<br>
&gt; method.<br>
&gt;<br>
&gt; If the child UIColumn has facets, call<br>
&gt; UIComponent.visitTree(javax.faces.component.visit.VisitContext,<br>
&gt; javax.faces.component.visit.VisitCallback) on each one.....&quot;<br>
&gt;<br>
&gt; I think we should do something like this:<br>
&gt;<br>
&gt;                 for (Iterator&lt;UIComponent&gt; itChildren =<br>
&gt; this.getChildren().iterator();<br>
&gt;                         !returnValue &amp;&amp; itChildren.hasNext();)<br>
&gt;                 {<br>
&gt;                     UIComponent child = itChildren.next();<br>
&gt;                     if (child instanceof UIColumn &amp;&amp;<br>
&gt; clientId.equals(child.getClientId()))<br>
&gt;                     {<br>
&gt;                         try {<br>
&gt;                             callback.invokeContextCallback(context, child);<br>
&gt;                         } catch (Exception e) {<br>
&gt;                             throw new FacesException(e);<br>
&gt;                         }<br>
&gt;                         returnValue = true;<br>
&gt;                     }<br>
&gt;                     // process the child&#39;s facets<br>
&gt;                     for (Iterator&lt;UIComponent&gt; itChildFacets =<br>
&gt; child.getFacets().values().iterator();<br>
&gt;                             !returnValue &amp;&amp; itChildFacets.hasNext();)<br>
&gt;                     {<br>
&gt;                         //recursive call to find the component<br>
&gt;                         returnValue =<br>
&gt; itChildFacets.next().invokeOnComponent(context, clientId, callback);<br>
&gt;                     }<br>
&gt;                 }<br>
&gt;<br>
&gt; Does that sounds reasonable? Should be fixed on 1.2.x branch too?<br>
&gt;<br>
&gt; regards,<br>
&gt;<br>
&gt; Leonardo Uribe<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
<br>
<a href="http://www.irian.at" target="_blank">http://www.irian.at</a><br>
<br>
Your JSF powerhouse -<br>
JSF Consulting, Development and<br>
Courses in English and German<br>
<br>
Professional Support for Apache MyFaces<br>
</blockquote></div><br>