Wednesday, February 24, 2016

ADF 12.2.1 - ExportCollectionActionListener exports column headings incorrectly after ordering columns

Update March 2017: this bug is still NOT FIXED. The Oracle Bug does not have a Fix Version.

Environment / assumptions for this post:

  • JDeveloper 12.2.1.0
  • Windows 7
  • Custom Fusion Web Application
This is admittedly a fairly low priority issue for us, but under the right circumstances it could be a big deal - if you export data from tables a lot.

In a nutshell: if you reorder a column in an af:table and then export the data via ExportCollectionActionListener, the data will be correct but the column headers will be the original header order.

To illustrate, I created a simple Test Case to submit to Oracle. 

Step 1 - simple table using a ViewObject that points to a simple basic database Table

Original table of data with Export button


Step 2 - Export the data and open in Microsoft Excel, looks fine

Data looks fine in Microsoft Excel

Step 3 - Re-order a column by dragging

Drag the order of columns - swap Firstname and Lastname

Step 4 - Export again - column headers wrong!

Second Export to Excel - data is correct but column headers are same as original

For reference, the Oracle BUG is #22791014.