<div class="gmail_quote">On Fri, Dec 11, 2009 at 5:39 PM, Ken Paulsen <span dir="ltr"><<a href="mailto:Ken.Paulsen@sun.com">Ken.Paulsen@sun.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
While perhaps there are ways to improve findComponent further, I am
failing to see the short coming that he describes. He states:<br>
<br>
It would be much better if there would be a standard way to find a
component by name. In fact JSF’s UIComponent has a method called
findComponent. Unfortunately, this method stops searching the component
tree whenever it encounters a naming container when a search is
performed.<br>
<br>
This is not true when you use a clientId (relative or absolute). For
example here's how you use an absolute path:<br>
<br>
componentA.findComponent(":form:container:componentB");<br></div></blockquote><div><br>This is what I object to (as a usage scenario). This is so unbelievably ugly and fragile it makes my mind bleed. We need to have a more elegant way to express this, and I think XPath (or like I said, jQuery if that is a more popular syntax) is a better approach.<br>
<br>And I don't think we should ever have to make a component developer write code to find a component. That is just horrible. We need to have a clean syntax for finding components that can cover 95% of the cases.<br>
<br>What makes the situation worse is that there is huge inconsistency between component libraries in how they implement component location. The standard goes down (I think), RichFaces faces goes up then down, Mojarra (impl) goes down then up then down. It's just crazy. We need a more deterministic and extensible solution.<br>
<br>I'm being a little dramatic intentionally just to try to channel some of the frustration that I have observed in developers. They really do freak out over this issue.<br><br>-Dan<br></div></div><br>-- <br>Dan Allen<br>
Senior Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br>
<a href="http://www.google.com/profiles/dan.j.allen">http://www.google.com/profiles/dan.j.allen</a><br>