ICEfaces
  1. ICEfaces
  2. ICE-7580

1st column in table not exported when using ice:column groupOn

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: EE-1.8.2.GA_P03, 3.0.RC1
    • Fix Version/s: 3.0, EE-1.8.2.GA_P04
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      -
    • Assignee Priority:
      P2

      Description

      Several columns in the ice:dataTable use the groupOn attribute which results in generating a rowspan. When exporting the table data using the ice:dataExporter, the first column's row spanned content does not export to excel. It appears as though the method encodeParentAndChildrenAsString(FacesContext fc, UIComponent uic) in DataExporter.java returns empty for this row spanned column. Another groupOn column within that same table in column 3 exports correctly. Please see attached screenshots and test case.

        Activity

        Hide
        Arturo Zambrano added a comment -

        Actually, this doesn't have anything to do with using the groupOn attribute or being the first column. The data can be exported if the outputText's inside the column use the 'value' attribute instead of inner text or EL expressions.

        For example, this markup won't export anything:

        <ice:outputText>#

        {row.name}</ice:outputText>

        ...but this markup will:

        <ice:outputText value="#{row.name}

        " />

        A sample page, ICEfacesPage1.xhtml, has been attached to show how the test app can work as intended with some minor changes on the page.

        The ice:dataExporter expects that anything inside a column will be an instance of UIComponent, since it needs to read the 'rendered' attribute to determine whether something is to be exported or not, and it assumes that any component that can be exported will have a 'value' attribute.

        This behavior could be feasibly improved to support other scenarios. For example. if one places an ice:panelGroup inside the column and some outputText's inside of it, the outputText's won't be exported since the processing for the column will stop because the ice:panelGroup component doesn't have a value.

        However, improving the layout (to look like what's rendere don the page) of the exported file when using the groupOn attribute is not very feasible. It would require a major change in the way the dataExporter processes tables, since rows are processed one by one, without considering the next and previous rows, and this processing is done for both csv and excel formats, and grouping a column would not be applicable to the csv format.

        Show
        Arturo Zambrano added a comment - Actually, this doesn't have anything to do with using the groupOn attribute or being the first column. The data can be exported if the outputText's inside the column use the 'value' attribute instead of inner text or EL expressions. For example, this markup won't export anything: <ice:outputText># {row.name}</ice:outputText> ...but this markup will: <ice:outputText value="#{row.name} " /> A sample page, ICEfacesPage1.xhtml, has been attached to show how the test app can work as intended with some minor changes on the page. The ice:dataExporter expects that anything inside a column will be an instance of UIComponent, since it needs to read the 'rendered' attribute to determine whether something is to be exported or not, and it assumes that any component that can be exported will have a 'value' attribute. This behavior could be feasibly improved to support other scenarios. For example. if one places an ice:panelGroup inside the column and some outputText's inside of it, the outputText's won't be exported since the processing for the column will stop because the ice:panelGroup component doesn't have a value. However, improving the layout (to look like what's rendere don the page) of the exported file when using the groupOn attribute is not very feasible. It would require a major change in the way the dataExporter processes tables, since rows are processed one by one, without considering the next and previous rows, and this processing is done for both csv and excel formats, and grouping a column would not be applicable to the csv format.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: