将面板数据导出为 primefaces 中的 PDF 和 CSV 格式?(不是数据表)
export panel data to PDF and CSV format in primefaces ?(not datatable)
<p:panel id="panelwv" style="padding:0px;right:600px;"
widgetVar="panelwv" visible="false" closable="true"
toggleable="true">
<f:facet name="header">
<h:outputText value="Save as " />
<h:commandLink>
<p:graphicImage value="resources/images/csv.png" />
<p:dataExporter type="csv" target="panelwv"
fileName="Monthly_Summary" />
</h:commandLink>
<h:commandLink>
<p:graphicImage value="resources/images/pdf.png" />
<p:dataExporter type="pdf" target="panelwv"
fileName="Monthly_Summary" />
</h:commandLink>
</f:facet>
</p:panel>
具有动态 data.I 的面板想要导出数据 pdf 和 csv format.I 我正在使用 primefaces 中的 <p:dataExporter>
标签,但它显示不支持的数据源 error.please 建议任何解决方案在 <p:panel>
.
中导出数据
正如 fine documentation 中所述,这是不可能的:
Target must point to a PrimeFaces Datatable.
它的存在是有原因的...使用它!
<p:panel id="panelwv" style="padding:0px;right:600px;"
widgetVar="panelwv" visible="false" closable="true"
toggleable="true">
<f:facet name="header">
<h:outputText value="Save as " />
<h:commandLink>
<p:graphicImage value="resources/images/csv.png" />
<p:dataExporter type="csv" target="panelwv"
fileName="Monthly_Summary" />
</h:commandLink>
<h:commandLink>
<p:graphicImage value="resources/images/pdf.png" />
<p:dataExporter type="pdf" target="panelwv"
fileName="Monthly_Summary" />
</h:commandLink>
</f:facet>
</p:panel>
具有动态 data.I 的面板想要导出数据 pdf 和 csv format.I 我正在使用 primefaces 中的 <p:dataExporter>
标签,但它显示不支持的数据源 error.please 建议任何解决方案在 <p:panel>
.
正如 fine documentation 中所述,这是不可能的:
Target must point to a PrimeFaces Datatable.
它的存在是有原因的...使用它!