ICEfaces
  1. ICEfaces
  2. ICE-8861

ace:dataExporter - OuterTableCSVExporter not exporting content

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.2.0.BETA
    • Fix Version/s: EE-3.2.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P1

      Description

      When using the OuterTableCSVExporter custom dataExporter to export outer and inner dataTable contents, its no longer exporting the data when the first row of the table does not contain nested data.

      If the first row has nested data then it exports correctly. When there is no data, all it exports is the column headers.
      1. Case11869Example.zip
        21 kB
        Arran Mccullough
      2. Case11869ExampleWAR.zip
        9.34 MB
        Arran Mccullough

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case that shows this issue.

        Steps:

        • Load welcomeICEfaces.jsf
        • Click on the Export button. The exported CSV will only contain the column headers.
        Show
        Arran Mccullough added a comment - Attached test case that shows this issue. Steps: Load welcomeICEfaces.jsf Click on the Export button. The exported CSV will only contain the column headers.
        Hide
        Arran Mccullough added a comment -

        Support case #11869

        Show
        Arran Mccullough added a comment - Support case #11869
        Hide
        Arturo Zambrano added a comment -

        No modifications to the data exporter have been made since October 19.

        Now, it seems like the InnerTableCSVExporter is always getting passed the first-row inner table to export, and thus it's not exporting anything.

        Show
        Arturo Zambrano added a comment - No modifications to the data exporter have been made since October 19. Now, it seems like the InnerTableCSVExporter is always getting passed the first-row inner table to export, and thus it's not exporting anything.
        Hide
        Arturo Zambrano added a comment -

        A similar thing happens when any row other than the first one has no nested data. All the inner tables are printed correctly from the first row up to the row with no nested data, after that, all the subsequent rows do not export their inner tables.

        Show
        Arturo Zambrano added a comment - A similar thing happens when any row other than the first one has no nested data. All the inner tables are printed correctly from the first row up to the row with no nested data, after that, all the subsequent rows do not export their inner tables.
        Hide
        Arturo Zambrano added a comment - - edited

        While the client id of each inner table seems to be correct (i.e. they are different from each other), their state is not correct; calling table.getRowCount() returns 0 for all the inner tables (which have data) that appear after an inner table with no data.

        This even happens when doing an entire visit tree procedure for each inner table. This is what gets printed when trying to find each inner table client id and calling getRowCount():

        • iceForm:testTable:0:innerTestTable 2
        • iceForm:testTable:1:innerTestTable 0
        • iceForm:testTable:2:innerTestTable 0
        • iceForm:testTable:3:innerTestTable 0

        The third and fourth inner tables actually have 2 and 3 rows, respectively.

        Show
        Arturo Zambrano added a comment - - edited While the client id of each inner table seems to be correct (i.e. they are different from each other), their state is not correct; calling table.getRowCount() returns 0 for all the inner tables (which have data) that appear after an inner table with no data. This even happens when doing an entire visit tree procedure for each inner table. This is what gets printed when trying to find each inner table client id and calling getRowCount(): iceForm:testTable:0:innerTestTable 2 iceForm:testTable:1:innerTestTable 0 iceForm:testTable:2:innerTestTable 0 iceForm:testTable:3:innerTestTable 0 The third and fourth inner tables actually have 2 and 3 rows, respectively.
        Hide
        Arturo Zambrano added a comment -

        The problem starts with a change to DataTable.java (in the ACE folder) at revision 32831 for ICE-8798. I will see if the problem can be solved by adjusting the custom exporters to these changes or if the fix lies on the DataTable.java code.

        Show
        Arturo Zambrano added a comment - The problem starts with a change to DataTable.java (in the ACE folder) at revision 32831 for ICE-8798 . I will see if the problem can be solved by adjusting the custom exporters to these changes or if the fix lies on the DataTable.java code.
        Hide
        Arturo Zambrano added a comment -

        Committed fix to the trunk at revision 32995.

        The fix consists in resetting the data model of the inner table before the export process starts.

        Show
        Arturo Zambrano added a comment - Committed fix to the trunk at revision 32995. The fix consists in resetting the data model of the inner table before the export process starts.
        Hide
        Arturo Zambrano added a comment -

        Committed improvement at revision 33062 to export inner table headers if they are defined inisde an ace:columnGroup and ace:row's. Added constructor to OuterTableCSVExporter to only require to pass the id of the inner table; this custom exporter will try to find the inner table component instance in this case and also in the case where the instance object is passed as well but it happens to be null.

        Show
        Arturo Zambrano added a comment - Committed improvement at revision 33062 to export inner table headers if they are defined inisde an ace:columnGroup and ace:row's. Added constructor to OuterTableCSVExporter to only require to pass the id of the inner table; this custom exporter will try to find the inner table component instance in this case and also in the case where the instance object is passed as well but it happens to be null.
        Hide
        Arturo Zambrano added a comment -

        Committed a fix at revision 33081 to support inner tables nested inside other containers when using the new approach to initialize the outer table exporter.

        Updated showcase demo to use the new approach.

        Show
        Arturo Zambrano added a comment - Committed a fix at revision 33081 to support inner tables nested inside other containers when using the new approach to initialize the outer table exporter. Updated showcase demo to use the new approach.
        Hide
        Carmen Cristurean added a comment -

        Verified this change (rev# 33095) in showcase -> DataExporter -> Custom Exporter, and found this behavior: even when no innerTable has been selected, the exported csv file contains the innerTable1 data in the exported file. Is this correct?

        This JIRA cannot be verified using the attached war file, as there are errors when deploying it.

        Show
        Carmen Cristurean added a comment - Verified this change (rev# 33095) in showcase -> DataExporter -> Custom Exporter, and found this behavior: even when no innerTable has been selected, the exported csv file contains the innerTable1 data in the exported file. Is this correct? This JIRA cannot be verified using the attached war file, as there are errors when deploying it.
        Hide
        Arturo Zambrano added a comment -

        Yes, that behaviour is correct, since it's specified in the bean to use innerTable1 as the default inner table.

        Testing for this feature should be done on the showcase, so no need to use the attached war.

        Show
        Arturo Zambrano added a comment - Yes, that behaviour is correct, since it's specified in the bean to use innerTable1 as the default inner table. Testing for this feature should be done on the showcase, so no need to use the attached war.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arran Mccullough
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: