webtier@glassfish.java.net

Re: JSF 2.0 composite components with method-valued attributes

From: <webtier_at_javadesktop.org>
Date: Fri, 06 Mar 2009 11:17:34 PST

I think we still have a composite attributes problem: I changed nav button to

<composite:interface>
    <composite:attribute name="act" targets="w:navbutton" required="true" method-signature="String f1()" />
    <composite:attribute name="label" />
</composite:interface>

<composite:implementation>
<ez:wrapper id="w">
<h:outputText value="#{compositeComponent.attrs.label}"/>
   <h:commandButton id="navbutton" action="#{compositeComponent.attrs.act}" value="NavButton" type="submit" />
</ez:wrapper>
    <!-- <h:commandButton id="navbutton" action="nav2" value="NavButton" type="submit" /> -->
</composite:implementation>

and the label does not show up.
If I move h:outputText outside the wrapper, it works fine.

The nav page now contains:

<ez:wrapper>
       <f:facet name="header">
           <h:panelGroup>
                header-facet
</h:panelGroup>
</f:facet>

         <ez:nav act="#{navigation.goNav2}" label="LABEL" />
</ez:wrapper>

and the wrapper is

    <composite:interface name="wrapper">
        <composite:facet name="header" required="false"/>
    </composite:interface>
    <composite:implementation>

<composite:insertFacet name="header"/>

above
        <h:outputLink>a link </h:outputLink>

            <composite:renderUsingPageChildren/>
below
    </composite:implementation>


I was dreaming so long to get rid of facelets templates :-(
[Message sent by forum member 'nzinoviev' (nzinoviev)]

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