I have a composite component with a dataScroller inside (tomahawk). In my xhtml I tried to use this component but I receive an error:
java.lang.IllegalArgumentException: could not find UIData referenced by attribute dataScroller@for = 'myTable'
The component:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:t="http://myfaces.apache.org/tomahawk">
<composite:interface>
<composite:attribute name="for" targets="scroll"></composite:attribute>
<composite:attribute name="paginatorMaxPages" />
</composite:interface>
<h:head>
</h:head>
<h:body>
<composite:implementation>
<div class="paginacao">
<t:dataScroller id="scroll" for="#{cc.attrs.for}"
styleClass="paginador" renderFacetsIfSinglePage="false"
pageIndexVar="numeroPagina" pageCountVar="quantidadePaginas"
rowsCountVar="quantidadeRegistros" paginator="true"
paginatorMaxPages="#{cc.attrs.paginatorMaxPages}"
paginatorTableClass="paginasPaginador"
paginatorActiveColumnClass="negrito">
<f:facet name="first">#{labels['paginacao.primeira']}</f:facet>
<f:facet name="previous">#{labels['paginacao.anterior']}</f:facet>
<f:facet name="next">#{labels['paginacao.proxima']}</f:facet>
<f:facet name="last">#{labels['paginacao.ultima']}</f:facet>
</t:dataScroller>
</div>
</composite:implementation>
</h:body>
</html>
My datatable:
<h:form>
...
<t:dataTable id="myTable" var="item" value="#{mBean.lista}">
...
</t:dataTable>
...
</h:form>
<param:parametrosScroll id="dataScroller" for="myTable" paginatorMaxPages="5" />