Export Selected Rows Only in ADF Table

Hi All,

In this post I am going to show you that how you can export the selected rows only present in the ADF table.

Suppose if you have a ADF table in your application with a button to export the table data in excel.


By default it will export all the rows present in the table.
When you see the code for exporting all rows present in table to excel in your page it will be somewhat like this:

  <af:commandButton text="Export Selected Row" id="cb1">
          <af:exportCollectionActionListener exportedId="t1" type="excelHTML"
                                             filename="export.xls"/>
        </af:commandButton>


where "t1" is the id of the ADF table.

In order to export the selected row only from ADF table we have to modify our above code as shown below.

  <af:commandButton text="Export Selected Row" id="cb1">
          <af:exportCollectionActionListener exportedId="t1" type="excelHTML"
                                             exportedRows="selected"
                                             filename="export.xls"/>
        </af:commandButton> 


Comments

  1. i tried to export all rows and selected rows to excel. Exporting all rows is working fine. But exporting selected rows in not working as per the expectation. Its exporting only the last rows in the selected list.

    ReplyDelete

Post a Comment

Popular posts from this blog

Setting up the environment for Angular2 and Hello World Example in Angular2

Showing number of rows or row count on top and bottom of table in ADF.

Build a Simple ReactJS application using react-cli