webtier@glassfish.java.net

Re: JSF 2.0 composite components with method-valued attributes

From: <webtier_at_javadesktop.org>
Date: Fri, 13 Mar 2009 16:06:02 PDT

Thank you very much. The explanation is not quite clear at the beginning but it all becomes clear after reading about the example.
I wonder if targets attributes are of any use now? Well, may be there are special cases.
I never quite understood the reason for them except that may be they provide some clue to the system.

I have an obvious question now that we have compositeComponent.parent
(how long do we have it? BTW: it would be very nice to know a place where compositeComponent properties are documented cause that is the kind of magic one doesn't want to miss),so suppose I have my:column component which I know is always used inside my:table component. Of course, I cannot impose such a restriction, but still
am I right that inside the my:column implementation I can access parent attributes via
compositeComponent.parent.attrs ? I remember I was considering this would be very useful because my table uses a controller object which otherwise I have to attach to all the columns manually (there's my orphaned thread somewhere here on writting a custom h:dataTable analog via composite components). Probably, it still doesn't help to render my:column header facets at the my:column header and their bodies inside my:table body. The only solution I can think of is rendering my:column in two different modes base on some external variable set by my:table..
[Message sent by forum member 'nzinoviev' (nzinoviev)]

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