webtier@glassfish.java.net

Re: [webtier] JSF 2.0 PR composite:includeChildren

From: <webtier_at_javadesktop.org>
Date: Tue, 03 Mar 2009 23:18:35 PST

Hi,

I ran into the same problem, but my use case is a bit different. I am developing custom dataTable like component and I am also unable to pass children to the component when in used inside composite faclet component.

It actually doesnt work with standard h:dataTable either. You can't do something like:

<composite:implementation>
            <h:dataTable
                value="#{compositeComponent.attrs.value}"
            var="row" >
                <composite:renderUsingPageChildren/>
        </h:dataTable>
</composite:implementation>

Is there still a plan to provide <ui:insert> like functionality? composite:includeChildren is even gone in the latest release.

What would also be useful would be way to only include specific children but at different places in the composite component.
It would be a bit like facets or ui:decorate facility but more elegant and more powerful with something like XPATH to tell which children go where in the composite component.

One more thing. If you use

<h:dataTable var="#{compositeComponent.attrs.var}"

in the example above, you get:

java.lang.IllegalArgumentException
        at javax.faces.component.UIData.setValueExpression(UIData.java:702)
        at com.sun.faces.facelets.tag.jsf.ComponentRule$ValueExpressionMetadata.applyMetadata(ComponentRule.java:104)
        at com.sun.faces.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:74)
        at javax.faces.webapp.pdl.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:96)
        at com.sun.faces.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
        at com.sun.faces.facelets.tag.composite.ImplementationHandler.apply(ImplementationHandler.java:74)
 

Regards,
Peter
[Message sent by forum member '5rkozelj' (5rkozelj)]

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