One even more crazy idea: if you want expressions like compositeComponent.attrs to work as is in the final tree, since composite component interfaces have names - may be it is better to use them instead? This will work since implementation of a composite component cannot use the same component. So for ez:nav we would use
ez:nav.attrs.label instead of compositeComponent.attrs.label this would mean: find nearest parent with name ez:nav and take it's attribute called 'label'. May be it's even more readable, except the "ez:" we have to add to deal with name clashes (may be we do not have to?). And then name on the interface gets some meaning...
May be nav.clientId or nav.attrs.label would be equally readable...
(One may also wonder why we have to specify "attrs" at all, why not reserve parent and clientId names... or just use .attrs.parent notation only if there's an attribute with name 'parent'). Sorry for this criticizm.
[Message sent by forum member 'nzinoviev' (nzinoviev)]
http://forums.java.net/jive/thread.jspa?messageID=336972