【问题标题】:Primefaces 10 dataexport with subtable not workingPrimefaces 10 数据导出与子表不工作
【发布时间】:2021-08-06 08:21:43
【问题描述】:

在我们切换到 Primefaces 10 后,从带有子表的表中导出数据不再起作用。有没有人有类似的问题或解决方案? 我们的目标是将带有子表的表下载到 Excel 文件中。

源码:

                 <p:splitButton
                        id="submitButtonId"
                        value="#{msg.global_button_search}"
                        update="table"
                        icon="#{style.global_icon_search}"
                        actionListener="#{appointment.loadEvents}"
                        styleClass="MarTop10">
                    <p:menuitem
                            value="#{msg.global_button_exportExcel}"
                            icon="#{style.global_icon_excel} splittIcon"
                            id="xls"
                            ajax="false">
                        <p:dataExporter
                                type="xlsxstream"
                                target="table"
                                fileName="Terminueberwachung" />
                    </p:menuitem>
                    <p:menuitem
                            value="#{msg.global_button_exportPdf}"
                            icon="#{style.global_icon_pdf} splittIcon"
                            id="pdf"
                            ajax="false">
                        <p:dataExporter
                                type="pdf"
                                target="table"
                                fileName="Terminueberwachung"/>
                    </p:menuitem>
                </p:splitButton>

【问题讨论】:

  • 你可以在这里报告 PrimeFaces 问题github.com/primefaces/primefaces/issues
  • DataExporter 被大量重构,但我不记得它曾经支持 SubTable?
  • 你确定这在以前的 PF 版本中有效吗?我正在查看 Exporter 源代码,并且 Subtable 没有在任何地方处理。

标签: primefaces data-export


【解决方案1】:

Primefaces Extensions 有 subTable 选项,它被移除以支持 Primefaces 10。所以可以预料,Primefaces 应该涵盖它的所有功能,但在这种情况下,它没有。

【讨论】:

    猜你喜欢
    • 2014-07-05
    • 1970-01-01
    • 2013-10-17
    • 2014-05-26
    • 2014-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多