webtier@glassfish.java.net

Re: adding composite components dynamically

From: <webtier_at_javadesktop.org>
Date: Tue, 25 Aug 2009 18:05:43 PDT

Thanks for the information! I've been looking all over javaserverfaces.dev.java.net for documentation and have not been able to find anything useful, but the link you gave me is great.

Your code gave me a lot of ideas to search for. Have you looked at jsf-ri\src\com\sun\faces\facelets\tag\jsf\CompositeComponentTagHandler, particularly the method applyCompositeComponent? It is pretty similar to your code, which makes me think that to fully support dynamic composite components, one would need to replicate pretty much the entire class. I don't know how much of it is implementation specific and how much is pure API though.

Alternatively, I wonder if it's possible to trigger the built-in behavior by publishing an event or manually calling some of the phase handlers on the newly created but empty composite component. Otherwise it seems like too much work to be the right way.
[Message sent by forum member 'stdarg' (jrbrock_at_gmail.com)]

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