This content has been marked as final. Show 5 replies
You can try to return all attributes in the table and hide the not needed columns when displaying the table (using the visible property or the hide column feature). Then try exporting the data, you may get lucky that hte export then uses all columns. If not you can set the visible property or hidden column flag to a state that the data is visible. Then the export should export all data.
Sounds like we're on the same page, but unfortunately it didn't work. I tried adding one of the attributes that doesn't need to be displayed to the results table, then set it's column Rendered settiing to false. It disappeared from the results table but also was not included in the export. Then I set the Rendered setting back to true and set it's Visible setting to false. Again, it disappeared from the results table but was not included in the export.
You can catch the export event and alert the columns before exciting it. Check out my blog http://wp.me/pcBZk-42
Instead of validating you set the columns to visible.
I think that there is a way to find out if the table is rendered for the display or for export. If this is true you should be able to archive this directly on the table by using this flag in an EL on the columns . I don't remember it right know.
Thanks. I'll take a look at your blog and see if I can make that work.
maybe you could set a styleClass in each column you can hide with css visibility property hide. I do not know if it works, but as it is out of the jsf context, in the export time could work.