Using dataExporter in a composite component is not working

UI Components for JSF
Post Reply
mario_
Posts: 36
Joined: 17 Feb 2011, 12:49

01 Mar 2011, 00:26

PrimeFaces-2.2.1 on Mojarra-2.0.4

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>


Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests