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

        Arran Mccullough created issue -
        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.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case11869Example.zip [ 15315 ]
        Attachment Case11869ExampleWAR.zip [ 15316 ]
        Hide
        Arran Mccullough added a comment -

        Support case #11869

        Show
        Arran Mccullough added a comment - Support case #11869
        Ken Fyten made changes -
        Fix Version/s EE-3.2.0.GA [ 10332 ]
        Assignee Arturo Zambrano [ artzambrano ]
        Assignee Priority P1 [ 10010 ]
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #32995 Tue Jan 08 15:39:55 MST 2013 art.zambrano ICE-8861 reset data model of inner table in order to prevent problem of not exporting the tables that appear after a table with no data
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/InnerTableCSVExporter.java
        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.
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #33062 Tue Jan 15 10:23:28 MST 2013 art.zambrano ICE-8861 made fix to export inner table headers when using ace:columnGroup; made improvement to OuterTableCSVExporter constructor to only require the id of the inner table and find the inner table object by itself, and to find it if the inner table object is also supplied but is null
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/OuterTableCSVExporter.java
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #33081 Wed Jan 16 18:28:44 MST 2013 art.zambrano ICE-8861 fix to support inner tables nested in other containers when using the new approach to initialize the outer table exporter
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/dataexporter/OuterTableCSVExporter.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #33082 Wed Jan 16 18:35:01 MST 2013 art.zambrano ICE-8861 modified demo to use the new, easier approach to initialize the outer table exporter
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/dataExporter/DataExporterCustom.java
        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.
        Carmen Cristurean made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        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.
        Arturo Zambrano made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: