webtier@glassfish.java.net

Re: composite component with "for" attribute in jsf2.0 - is it possible?

From: <webtier_at_javadesktop.org>
Date: Thu, 01 Apr 2010 08:48:20 PDT

By all means, avoid using JSTL tags in JSF. Only use Facelets tags. This will save you a lot of trouble in the long run. (http://onjava.com/pub/a/onjava/2004/06/09/jsf.html)

You could try something like:

[code]
<composite:implementation>
    <h:panelGroup id="#{cc.clientId}" layout="block" rendered="#{not empty facesContext.getMessageList(cc.attrs.for)}">
        <ui:repeat value="#{facesContext.getMessageList(cc.attrs.for)}" var="_msg">
            <h:outputText value="#{_msg.summary}"/><br/>
        </ui:repeat>
    </h:panelGroup>
</composite:implementation>
[/code]

The most important part in the snipped above is the [b]rendered[/b] attribute.
[Message sent by forum member 'vesuvius']

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