I have a search that only displays the more important attributes in the results table and am using the af:exportCollectionActionListener to give the users the ability to export the results to excel. The users have asked if the export can include all of the attributes instead of just the ones I'm returning/displaying for them in the results table. Does anyone know if there is a way to only return/display some of the view attributes in the search results table but when using af:exportCollectionActionListener, include all of the view attributes in the export? I'm developing in JDeveloper 220.127.116.11.
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.