p:dataexporter is not export data

UI Components for JSF
Post Reply
richard
Posts: 5
Joined: 17 Aug 2010, 08:12

17 Aug 2010, 08:20

Hi guys, I use p:dataexporter to export report file , but report have no data, just have only one colunm row. And datatable is ok.
please help me thanks!

Code is :

Code: Select all

			<p:dialog id="dialog" header="Detail" widgetVar="dlg" width="450">
				
				<p:dataTable id="rptDetail" var="pci"
					value="#{pciRptBean.rptDetailModel}" paginator="true" rows="10"
					dynamic="true" lazy="true" pageLinks="10"
					paginatorPosition="bottom">
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{ts_messages['colum_report_date']}" />
						</f:facet>
						<h:outputText value="#{pci.testDate}">
							<f:convertDateTime pattern="yyyy-MM-dd HH:mm"
								timeZone="#{pciRptBean.timeZone}" />
						</h:outputText>
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{ts_messages['colum_report_status']}" />
						</f:facet>
						<h:outputText value="#{pci.testStatus}">
							<f:converter converterId="result" />
						</h:outputText>
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{ts_messages['colum_report_detail']}" />
						</f:facet>
						<h:outputText id="detailTxt" value="#{pci.testDetail}">
							<f:converter converterId="details" />
						</h:outputText>
					</p:column>					
				</p:dataTable>
				
				
				<h:panelGrid columns="2">
					<p:panel>
						<h:commandLink id="xlsLink">
							<p:graphicImage
								value="/statics/branding/#{guestPreferences.branding}/images/faces/excel.png" />
							<p:dataExporter type="xls" target="rptDetail" pageOnly="true" postProcessor="#{pciRptBean.postXSLProcess}"
								fileName="pciReport" />
						</h:commandLink>
						<p:tooltip for="xlsLink">
							<h:outputText value="Export detail report to XLS format."/>
						</p:tooltip>
						<h:commandLink id="pdfLink">
							<p:graphicImage
								value="/statics/branding/#{guestPreferences.branding}/images/faces/pdf.png" />
							<p:dataExporter type="pdf" target="rptDetail"
								fileName="pciReport" />
						</h:commandLink>
						<p:tooltip for="pdfLink">
							<h:outputText value="Export detail report to PDF format."/>
						</p:tooltip>
						<h:commandLink id="cvsLink">
							<p:graphicImage
								value="/statics/branding/#{guestPreferences.branding}/images/faces/csv.png" />
							<p:dataExporter type="csv" target="rptDetail"
								fileName="pciReport" />
						</h:commandLink>
						<p:tooltip for="cvsLink">
							<h:outputText value="Export detail report to CVS format."/>
						</p:tooltip>
						<h:commandLink id="xmlLink">
							<p:graphicImage
								value="/statics/branding/#{guestPreferences.branding}/images/faces/xml.png" />
							<p:dataExporter type="xml" target="rptDetail"
								fileName="pciReport" />
						</h:commandLink>
						<p:tooltip for="xmlLink">
							<h:outputText value="Export detail report to XML format."/>
						</p:tooltip>						
					</p:panel>
				</h:panelGrid>
			</p:dialog>

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

17 Aug 2010, 16:12

Make sure data is available at export request, also lazy export is not supported yet. See;

http://code.google.com/p/primefaces/iss ... ail?id=668

richard
Posts: 5
Joined: 17 Aug 2010, 08:12

18 Aug 2010, 05:31

Thanks. That 's lazy datatable . What should I do if I want to export lazy datatable ? Have some method?


Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 56 guests