表示dataExporter和嵌套的dataTable [英] Primefaces dataExporter and nested dataTable
问题描述
我正在另一个 dataTable
中使用 dataTable
。
当我尝试使用 dataExporter
导出(以任何格式)时,我的东西就像: org.primefaces.component.datatable。 DataTable @ 1b675ca
而不是inner-dataTable值。
I'm using a dataTable
inside another dataTable
.
When I try to export (in any format) using the dataExporter
i got something like: "org.primefaces.component.datatable.DataTable@1b675ca
" instead of the inner-dataTable values.
是否限制 dataExporter
?我必须实现扩展 dataExporter
的这个功能?
任何替代方案?
Is it a limit of dataExporter
? I have to implement this functionality extending dataExporter
?
Any Alternatives?
推荐答案
这是 dataExporter
你必须让自己的出口商做到这一点。我认为最好尝试从 Export
类覆盖方法 exportValue
(这是所有自定义导出类的超类) 。在这里,如果value不是 HtmlCommandLink
或 ValueHolder
只是 toString()$的实例c $ c>被使用,所以这就是为什么你看到这是打印。此外,您将不得不使您的动作监听器实例化您的自定义类进行导出。
This is limitation of dataExporter
you have to make your own exporter to do this. I think it is best to try to override method exportValue
from Export
class (which is superclass of all custom export classes). Here, if value is not instance of HtmlCommandLink
or ValueHolder
just toString()
is used, so that is why you see this is printed. Additionally you will have to make your action listener which will instantiate your custom classes for exporting.
这篇关于表示dataExporter和嵌套的dataTable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!