You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
There are several features in JSF which require one component to reference another component. There are slight variations in the algorithm used to find the related component. There are two concerns to address:
Additionally, the syntax for component referencing should be made more intuitive and flexible.
Let's consider how the for attribute on the h:outputLabel and h:message components is handled.
MyFaces does the following:
This behavior is identical to the f:ajax execute/render id behavior, at least in the case where the id corresponds to a component that can be found in the component tree.
Mojarra starts off similar:
- Calls findComponent() using the outputLabel/message component as the base component.
For cases where a relative id is specified in the same naming container, or an absolute id is specified, both f:ajax and h:outputLabel behave the same in Mojarra. However, in the event that the findComponent() call does not find the component, Mojarra then goes on to:
That's a lot of component tree walking!
Here's what we need:
::prefix to pop one level in the hierarchy or use an XPath or jQuery syntax