Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

exportCollectionActionListener gives errror when selectBooleanCheckbox in column

KdeGraafJun 3 2019 — edited Jun 25 2019

Hi all,

I'm using JDEV 12.2.1.3 and I'm having a problem when I want to export a table to Excel.

When the table contains a checkbox the the export contains only the headers and the first line and then "Export is incomplete due to error ."

When I remove the last column containing the checkbox the export is working fine.

Is there a workaround for this issue?

Thanks Klaas

                <af:table value="#{bindings.LinesAndSplitLinesLB1.collectionModel}" var="row" rows="#{bindings.LinesAndSplitLinesLB1.rangeSize}" emptyText="#{bindings.LinesAndSplitLinesLB1.viewable ? AproEBPartialProcessingViewControllerBundle.NO_DATA_TO_DISPLAY_ : AproEBPartialProcessingViewControllerBundle.ACCESS_DENIED_}" rowBandingInterval="0" rowSelection="multiple" fetchSize="#{bindings.LinesAndSplitLinesLB1.rangeSize}" filterModel="#{bindings.LinesAndSplitLinesLB1Query.queryDescriptor}" queryListener="#{bindings.LinesAndSplitLinesLB1Query.processQuery}" varStatus="vs" id="t3" columnStretching="last" horizontalGridVisible="false" verticalGridVisible="false" binding="#{pageFlowScope.PartialProcessingBean.tableLbLines}" selectionListener="#{bindings.LinesAndSplitLinesLB1.collectionModel.makeCurrent}">

                  <af:column sortProperty="#{bindings.LinesAndSplitLinesLB1.hints.OriginalLine.name}" filterable="true" sortable="true" headerText="#{bindings.LinesAndSplitLinesLB1.hints.OriginalLine.label}" id="c118">

                    <af:outputText value="#{row.OriginalLine}" shortDesc="#{bindings.LinesAndSplitLinesLB1.hints.OriginalLine.tooltip}" id="ot118"/>

                  </af:column> 

                  <af:column sortProperty="#{bindings.LinesAndSplitLinesLB1.hints.RunNumber.name}" filterable="true" sortable="true" headerText="#{bindings.LinesAndSplitLinesLB1.hints.RunNumber.label}" id="c150">

                    <af:outputText value="#{row.RunNumber}" shortDesc="#{bindings.LinesAndSplitLinesLB1.hints.RunNumber.tooltip}" id="ot149">

                      <af:convertNumber groupingUsed="false" pattern="#{bindings.LinesAndSplitLinesLB1.hints.RunNumber.format}"/>

                    </af:outputText>

                  </af:column> 

                  <af:column sortProperty="#{bindings.LinesAndSplitLinesLB1.hints.FileId.name}" filterable="true" sortable="true" headerText="#{bindings.LinesAndSplitLinesLB1.hints.FileId.label}" id="c151">

                    <af:outputText value="#{row.FileId}" shortDesc="#{bindings.LinesAndSplitLinesLB1.hints.FileId.tooltip}" id="ot150">

                      <af:convertNumber groupingUsed="false" pattern="#{bindings.LinesAndSplitLinesLB1.hints.FileId.format}"/>

                    </af:outputText>

                  </af:column> 

                  <af:column sortProperty="#{bindings.LinesAndSplitLinesLB1.hints.InstanceId.name}" filterable="true" sortable="true" headerText="#{bindings.LinesAndSplitLinesLB1.hints.InstanceId.label}" id="c152">

                    <af:outputText value="#{row.InstanceId}" shortDesc="#{bindings.LinesAndSplitLinesLB1.hints.InstanceId.tooltip}" id="ot151">

                      <af:convertNumber groupingUsed="false" pattern="#{bindings.LinesAndSplitLinesLB1.hints.InstanceId.format}"/>

                    </af:outputText>

                  </af:column>

                  <af:column headerText="#{bindings.LinesAndSplitLinesLB1.hints.ExternalInvoiceFound.label}" id="c115">

                    <af:selectBooleanCheckbox value="#{row.bindings.ExternalInvoiceFound.inputValue}" label="#{row.bindings.ExternalInvoiceFound.label}"

                                              shortDesc="#{bindings.LinesAndSplitLinesLB1.hints.ExternalInvoiceFound.tooltip}" id="sbc3"/>

                  </af:column>

                </af:table>

Comments

Timo Hahn

You can implement a method which gets your data first. There you check or alter the data. See https://tompeez.wordpress.com/2015/06/26/export-to-excel-enhancements-in-jdeveloper-11-1-1-9-0-and-jdeveloper-12-1-3/ for a sample.

Are the values set to true/false or are there null values for the checkbox?

Timo

KdeGraaf

Hi Timo,

Thanks I will check your link.

I just found out that when the there are more lines than the fetch size on the View Object then I get this error.
So it's a combination of having a checkbox in the table and having more than 25 lines in my situation.

KdeGraaf

Hi Timo,

What exactly do you mean with get the data first?

I added a filter method that is called 6 times (6 columns) and not more, probably it runs in an error before the filter is called. So I can't alter the data there.

FYI all the values are true/false and not null.

Thanks

dvohra21

So it's a combination of having a checkbox in the table and having more than 25 lines in my situation.

Increase the fetch size with fetchSize.

What is the error message? A checkbox value may not be displayable in Excel.

KdeGraaf

Hi it's not an option to increase the fetch size, because where to set it to? 1.000.000? That won't do the performance any good.

A checkbox will show as true/false in Excel. The message is in de file itself: "Export is incomplete due to error ."

KdeGraaf

I now also tried this post Andrejus Baranovskis Blog: ADF Hidden Gem - Export Collection Listener But the result is the same, only one row is exported and then the error "Export is incomplete due to error ."

Capture.PNG

Timo Hahn

Can you create a test case which we can use to recreate the problem (see )?

I have many such exports which run without a problem.

Timo

dvohra21

One row did get exported which indicates checkbox is exportable. What is the error message on the server?

KdeGraaf

There is no error on the server.

dvohra21

Demo runs with the entry page, which contains ADF UI table with Export all/selected rows options:

The Demo is for all/selected rows. Are all rows exported or selected or just one?

KdeGraaf

Hi Timo,

I tried to create a test case with the HR schema but in my test project it worked fine.

Timo Hahn

This suggests that there is something wrong with your code. Or the problem is related to the table and the data.

Without a reproducible test case, there isn't much we can do other than suggest using poi (poi.apache.org) and create the excel file this way.

Timo

KdeGraaf

Hi Timo,

Yes is my code or in ADF code something is going wrong, just the error message "Export is incomplete due to error" is not really helpful.

Thanks for the suggestion of poi, will take a look at that as a work around.

Timo Hahn

One thing you can try is to create a new application, create an EO/VO for the table to export there. Create ui for the table and add an export listener. Maybe there is a problem in the EO/VO hidden in the meta data.

Timo

1 - 14

Post Details

Added on Jun 3 2019
14 comments
398 views