webtier@glassfish.java.net

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

From: <webtier_at_javadesktop.org>
Date: Wed, 31 Mar 2010 06:46:11 PDT

Sorry, but it doesn't work:

items="${facesContext.getMessageList(cc.attrs.for)}" Error Parsing: ${facesContext.getMessageList(cc.attrs.for)}

using for instead of cc.attrs.for it is the same.

here is the piece of code I used just to try:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:composite="http://java.sun.com/jsf/composite">
<body>
        <composite:interface name="alert" displayName="alert">
                <composite:attribute name="img" required="false" default="icons/caution-40x40.png"/>
                <composite:attribute name="for" required="false" default=""/>
        </composite:interface>
        <composite:implementation>
                
                        <h:panelGrid columns="2"
                                                 cellpadding="5"
                                                 rendered="#{! empty facesContext.maximumSeverity}">
                                <c:forEach var="msg" items="${facesContext.getMessageList(cc.attrs.for)}">
                                </c:forEach>
                                                        
                        </h:panelGrid>
        </composite:implementation>
</body>
</html>
[Message sent by forum member 'maxqua72']

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