Given this datatable (naturally working):
<rich:dataTable var="var" value="#{values}">
<rich:column>
<f:facet name="header">
HEADER
</f:facet>
<h:outputText value="#{var}" />
</rich:column>
</rich:dataTable>
If I define a custom component (also ok in the syntax and at the right place under resources/components):
<?xml version="1.0" encoding="UTF-8"?>
<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:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:composite="http://java.sun.com/jsf/composite">
<!-- INTERFACE -->
<composite:interface>
<composite:attribute name="val" />
</composite:interface>
<!-- IMPLEMENTATION -->
<composite:implementation>
<rich:column>
<f:facet name="header">
HEADER
</f:facet>
<h:outputText value="#{cc.attrs.val}" />
</rich:column>
</composite:implementation>
</html>
Why does the following does not work?
<?xml version="1.0" encoding="UTF-8"?>
<ui:composition template="/WEB-INF/templates/default.xhtml"
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:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:my="http://java.sun.com/jsf/composite/components">
<ui:define name="content">
<rich:dataTable var="var" value="#{values}">
<my:mycolumn val="#{var}"/>
</rich:dataTable>
</ui:define>
</ui:composition>
Do you know how could I let it work (I want to define my own column and save code)? Thanks a lot! Bye
<cc:insertChildren/>
can you ? Is there a way to usejsf/composite
tags and say the root UIComponent must bejavax.faces.component.UIColumn
? – Kial