Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.1, EE-3.0.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Chrome17, FF10, IE9, ICEfaces 3.0

      Description

      Example page code:
                  <h:panelGrid columns="5">
                          <ace:dataExporter label="Export to CSV" type="csv" target="carTable" fileName="cars"/>
                          <ace:dataExporter label="Export to PDF" type="pdf" target="carTable" fileName="cars"/>
                          <ace:dataExporter label="Export to XLS" type="xls" target="carTable" fileName="cars"/>
                          <ace:dataExporter label="Export to XML" type="xml" target="carTable" fileName="cars"/>
                  </h:panelGrid>
                  
                 <ace:dataTable id="carTable"
                                          value="#{dataTableBean.cars}"
                                          var="car">
                      <ace:column headerText="Name">
                         <ace:cellEditor>
                              <f:facet name="output">
                                  <h:outputText value="#{car.name}"/>
                              </f:facet>
                              <f:facet name="input">
                                  <h:inputText value="#{car.name}"/>
                              </f:facet>
                          </ace:cellEditor>
                     </ace:column>
                     <ace:column headerText="Chassis">
                        <h:outputText value="#{car.chassis}"/>
                     </ace:column>
                     <ace:column headerText="Weight (lbs)">
                         <h:outputText value="#{car.weight}"/>
                     </ace:column>
                     <ace:column headerText="Options">
                         <ace:rowEditor/>
                     </ace:column>
                  </ace:dataTable>

      Bugs detected:
      1. Editable columns remain blank when exported to CSV file (in our case name column)
      2. Export to PDF file does not work at all
      3. Export to the XLS file throw an exception org.apache.poi.ss.usermodel.RichTextString - class java.lang.NoClassDefFoundError (on client).

      FF Console output:
      [window] received error message [code: 200]: <?xml version='1.0' encoding='UTF-8'?> <partial-response><error><error-name>class java.lang.NoClassDefFoundError</error-name><error-message><![CDATA[org.apache.poi.ss.usermodel.RichTextString]]></error-message></error><changes><extension aceCallbackParam="validationFailed">{"validationFailed":false}</extension></changes></partial-response>
      bridge...8177343 (line 1221)
      [window] received error message [code: 200]: <?xml version='1.0' encoding='UTF-8'?> <partial-response><error><error-name>class java.lang.NoClassDefFoundError</error-name><error-message><![CDATA[org.apache.poi.ss.usermodel.RichTextString]]></error-message></error><changes><extension aceCallbackParam="validationFailed">{"validationFailed":false}</extension></changes></partial-response>

      4. Export to XML file will produce next tag <name></name> for editable column, but the content of it will be blank as with CSV file
      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      Example page code:
      <h:panelGrid columns="5">
                          <ace:dataExporter label="Export to CSV" type="csv" target="carTable" fileName="cars"/>
                          <ace:dataExporter label="Export to PDF" type="pdf" target="carTable" fileName="cars"/>
                          <ace:dataExporter label="Export to XLS" type="xls" target="carTable" fileName="cars"/>
                          <ace:dataExporter label="Export to XML" type="xml" target="carTable" fileName="cars"/>
                  </h:panelGrid>
                  
                 <ace:dataTable id="carTable"
                                          value="#{dataTableBean.cars}"
                                          var="car"
                                          rowIndexVar="rowNo">
                     
                     <ace:column headerText="Row no">
                               <h:outputText value="#{rowNo + 1}"/>
                      </ace:column>
                     
                      <ace:column headerText="Name">
                         <h:outputText value="#{car.name}"/>
                     </ace:column>
                     <ace:column headerText="Chassis">
                        <h:outputText value="#{car.chassis}"/>
                     </ace:column>
                     <ace:column headerText="Weight (lbs)">
                         <h:outputText value="#{car.weight}"/>
                     </ace:column>
                  </ace:dataTable>

      Bugs detected:
      1. Row numbers always stay the same when exported to CSV file. (in our case it is 1)
      2. Export to PDF file does not work at all
      3. Export to the XLS file throws an exception org.apache.poi.ss.usermodel.RichTextString - class java.lang.NoClassDefFoundError (on client).
      4. Export to XML file will produce next tag: <row no>1</row no>. The number will always be the same for each row tag. In addition to the number, produced tag name is incorrect.

      Based on W3C recomendation:
      Names can contain letters, numbers, and other characters
      Names cannot start with a number or punctuation character
      Names cannot start with the letters xml (or XML, or Xml, etc)
      Names cannot contain spaces <<<< this is the one we are breaking during the export (http://www.w3.org/TR/REC-xml/#sec-white-space)
      Any name can be used, no words are reserved.
      1. src.rar
        2 kB
        Evgheni Sadovoi
      2. welcomeICEfaces.xhtml
        2 kB
        Evgheni Sadovoi

        Activity

        Hide
        Evgheni Sadovoi added a comment -

        Source files to reproduce are attached.

        Show
        Evgheni Sadovoi added a comment - Source files to reproduce are attached.
        Hide
        Arturo Zambrano added a comment -

        For the issues 2 and 3, did you verify that the required jars for PDF and XLS exporting (itext-2.1.7.jar and poi-3.7.jar) are in the classpath?

        Show
        Arturo Zambrano added a comment - For the issues 2 and 3, did you verify that the required jars for PDF and XLS exporting (itext-2.1.7.jar and poi-3.7.jar) are in the classpath?
        Hide
        Evgheni Sadovoi added a comment - - edited

        My bad with those jars. After addition export to PDF and XLS work the same as for CVS and XML types.

        So the summary for bugs look like this now:
        1. Row numbers always stay the same when data table with rowIndexVar column is exported.
        2. Editable rows remain blank when exported
        3. Invalid tag is generated when column with row number is exported to the XML file (<row no></row no>)
        4. Column containing <ace:rowEditor/> tag is exported (in our case <ace:column headerText="Options">)

        Last one is not really a bug, but I think it does make sense to add a filter which will exclude a column with <ace:rowEditor/> from export

        Show
        Evgheni Sadovoi added a comment - - edited My bad with those jars. After addition export to PDF and XLS work the same as for CVS and XML types. So the summary for bugs look like this now: 1. Row numbers always stay the same when data table with rowIndexVar column is exported. 2. Editable rows remain blank when exported 3. Invalid tag is generated when column with row number is exported to the XML file (<row no></row no>) 4. Column containing <ace:rowEditor/> tag is exported (in our case <ace:column headerText="Options">) Last one is not really a bug, but I think it does make sense to add a filter which will exclude a column with <ace:rowEditor/> from export
        Hide
        Arturo Zambrano added a comment - - edited

        For number 4 in the comment above, one can simply use the <ace:excludeFromExport /> component to prevent such column from being exported:

        <ace:column headerText="Options">
        <ace:excludeFromExport />
        <ace:rowEditor/>
        </ace:column>

        Show
        Arturo Zambrano added a comment - - edited For number 4 in the comment above, one can simply use the <ace:excludeFromExport /> component to prevent such column from being exported: <ace:column headerText="Options"> <ace:excludeFromExport /> <ace:rowEditor/> </ace:column>
        Hide
        Arturo Zambrano added a comment - - edited

        Fixed at revision 28015 in the trunk and at revision 28016 in the maintenance branch.

        • Added support for <ace:cellEditor>.
        • Added support for rowIndexVar.
        • Added method to sanitize all XML tag names according to the XML specification.
        Show
        Arturo Zambrano added a comment - - edited Fixed at revision 28015 in the trunk and at revision 28016 in the maintenance branch. Added support for <ace:cellEditor>. Added support for rowIndexVar. Added method to sanitize all XML tag names according to the XML specification.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Evgheni Sadovoi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: