webtier@glassfish.java.net

Re: JSF 2.0 composite components with method-valued attributes

From: <webtier_at_javadesktop.org>
Date: Fri, 13 Mar 2009 19:07:42 PDT

It just appeared to me.
There may be a serious problem.
When using in a page, the user knows the structure and can append parent if needed although it may be inconvenient -- there's one file per compositeComponent and so compositeComponent.attrs should ultimately refer to attributes of that component no matter where it occurs.
Now what about renderUsingPage children problem -- then one has no control over the used expressions. Suppose I have ez:wrapper and a ez:wrapper1 which implementation uses <ez:wrapper><..renderUsingPageChildren/></ez:wrapper>
now the outer component component uses
<ez:wrapper1>
  <h:outputText value="#{compositeComponent.parent.attrs.label}"/>
</ez:wrapper1>

looks like one has to use parent.parent in case of wrapper1, which is absolutely impossible to guess!

Actually, why there's any difference in using h:panelGroup or ez:wrapper ??!

compositeComponent.parent is a very useful feature but it has a different purpose.


I hope I'm missing some trick here and the above will work fine, but...
[Message sent by forum member 'nzinoviev' (nzinoviev)]

http://forums.java.net/jive/thread.jspa?messageID=336969