ICEfaces
  1. ICEfaces
  2. ICE-4823

dataExporter has issues exporting current page with ignorePagination set to false

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      -

      Description

      When on page > 1 in a paginated dataTable, the dataExporter (ignorePagination=false) will add empty rows to the spreadsheet accounting for entries in previous pages. For example, on page 1 it will correctly export the current page data with no extra empty rows. If you paginate to page 2 or 3, you will see the current page exported but also a large amount of empty rows which make up the previous pages. Attached is a screenshot.

        Activity

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Attachment screenshot-1.jpg [ 11910 ]
        Tyler Johnson made changes -
        Summary dataExporter has issues exporting current page with ignorePagination set to false
        dataExporter has issues exporting current page with ignorePagination set to false
        Salesforce Case []
        Description When on a page > 1 in a paginated dataTable, the dataExporter (ignorePagination=false) will add empty rows to the spreadsheet accounting for entries in previous pages. For example, on page 1 it will correctly export the current page data with no extra space. If you paginate to page 2 or 3, you will see the current page exported but also a large amount of empty rows which make up the previous pages. Attached is a screenshot. When on page > 1 in a paginated dataTable, the dataExporter (ignorePagination=false) will add empty rows to the spreadsheet accounting for entries in previous pages. For example, on page 1 it will correctly export the current page data with no extra empty rows. If you paginate to page 2 or 3, you will see the current page exported but also a large amount of empty rows which make up the previous pages. Attached is a screenshot.
        Tyler Johnson made changes -
        Salesforce Case [50070000009f00F]
        Hide
        Az Lacroix added a comment - - edited

        It's question about OutputHandler for Excel.
        DataExporter provide rowIndex, which used by ExcelOutputHandler.

        Way to fix this IMO next:

        (file ExcelOutputHandler.java, changed lines market with ///!)
        ...
        private Integer startRow = null; ///!
        ...
        public void writeCell(Object output, int col, int row) {

        if(startRow == null) startRow = new Integer(row); ///!
        WritableCell cell = null;

        if( output instanceof String )

        { cell = new Label(col, row + 1 - startRow.intValue(), (String)output); ///! }

        else if( output instanceof Double )

        { cell = new Number(col, row + 1 - startRow.intValue(), ((Double)output).doubleValue()); ///! }

        try

        { sheet.addCell(cell); }

        catch(WriteException e)

        { System.out.println("Could not write excel cell"); e.printStackTrace(); }

        }

        Show
        Az Lacroix added a comment - - edited It's question about OutputHandler for Excel. DataExporter provide rowIndex, which used by ExcelOutputHandler. Way to fix this IMO next: (file ExcelOutputHandler.java, changed lines market with ///!) ... private Integer startRow = null; ///! ... public void writeCell(Object output, int col, int row) { if(startRow == null) startRow = new Integer(row); ///! WritableCell cell = null; if( output instanceof String ) { cell = new Label(col, row + 1 - startRow.intValue(), (String)output); ///! } else if( output instanceof Double ) { cell = new Number(col, row + 1 - startRow.intValue(), ((Double)output).doubleValue()); ///! } try { sheet.addCell(cell); } catch(WriteException e) { System.out.println("Could not write excel cell"); e.printStackTrace(); } }
        Ken Fyten made changes -
        Fix Version/s 1.8.2 [ 10190 ]
        Assignee Priority P1
        Assignee Adnan Durrani [ adnan.durrani ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19156 Thu Aug 13 10:06:02 MDT 2009 adnan.durrani Fix for ICE-4823 (dataExporter has issues exporting current page with ignorePagination set to false)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/dataexporter/DataExporter.java
        Adnan Durrani made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Adnan Durrani added a comment -

        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\dataexporter\DataExporter.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\dataexporter\DataExporter.java
        Completed: At revision: 19156

        Show
        Adnan Durrani added a comment - Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\dataexporter\DataExporter.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\dataexporter\DataExporter.java Completed: At revision: 19156
        Adnan Durrani made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.8.2-RC1 [ 10210 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20024 Fri Dec 18 11:36:35 MST 2009 adnan.durrani 1.8.2EE DataExporter changes moved to Compat DataExporter towards ICE-4481. The changes include the fix of following JIRAs ICE-4484, ICE-4390, ICE-4660, ICE-4223, ICE-4823, ICE-4836, ICE-4837, ICE-4764, ICE-4730, ICE-4844, ICE-4289, ICE-4826, ICE-4863, ICE-4934, ICE-4955
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/component-metadata/src/main/resources/conf/ice_cust_properties/cust-dataExporter-props.xml
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/resources/META-INF/resources/ice-extras.js
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/samples/component-showcase/web/WEB-INF/includes/examples/custom/dataTable-dataExporter.xhtml
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/dataexporter/DataExporter.java
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/dataexporter/DataExporterRenderer.java
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/java/com/icesoft/faces/util/CoreUtils.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

          • Assignee:
            Adnan Durrani
            Reporter:
            Tyler Johnson
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: