Using the dataExporter in a composite component is not working. The target is not found.
Code: Select all
<composite:interface>
<composite:attribute name="target" required="true"/>
<composite:attribute name="fileName" required="false" default="export"/>
<composite:attribute name="excludeColumns" required="false"/>
<composite:attribute name="pageOnly" required="false" default="false"/>
<composite:attribute name="space" required="false" default="20"/>
</composite:interface>
<!-- IMPLEMENTATION -->
<composite:implementation>
<h:commandLink>
<h:graphicImage library="images" name="excel.png" height="20px" style="border:0px"/>
<p:dataExporter type="xls" target="#{cc.attrs.target}" fileName="#{cc.attrs.fileName}.csv"
excludeColumns="#{cc.attrs.excludeColumns}"/>
</h:commandLink>
<p:spacer width="#{cc.attrs.space}"/>
<h:commandLink>
<h:graphicImage library="images" name="pdf.png" height="20px" style="border:0px"/>
<p:dataExporter type="pdf" target="#{cc.attrs.target}" fileName="#{cc.attrs.fileName}.pdf"
excludeColumns="#{cc.attrs.excludeColumns}"/>
</h:commandLink>
</composite:implementation>