Icefaces dataExporter does not display value of a column

787 Views Asked by At

I am using Icefaces 3.3 and ice:dataExporter to export excel format of a datatable but it doesn't load any values in the excel sheet. It shows only the header of each column. I figured that the panelGroup wrapped around the column value is causing the issue. Is there a way to fix the issue without removing the panelGroup?

<ice:dataExporter includeColumns="2,3,4,5,6,7,8,9" label="Export to Excel" id="iceDataExp_id_2" styleClass="iceDataExp" for="carTable" type="excel"/>
<ice:dataTable id="carTable" value="#{carBean.carList}" var="car">
...<!-- Column 0 -->
...<!-- Column 1 -->
<!--Column 2 -->
<ice:column rowspan="2">
                <f:facet name="header">
                        <h:outputText value="Name"/>
                </f:facet>
                <ice:panelGroup contextValue="#{car.Id}"
                    menuPopup=":::myPopupmenu">
                    <ice:outputText value="#{car.carName}" />
                </ice:panelGroup>
</ice:column>
....
</ice:dataTable>
2

There are 2 best solutions below

0
On

Not that I know of... As a workaround, you could just replace it with a link "export". That link would be a commandLink inside the column that will trigger the export.

0
On

Even if this is quite an old question. I just had the same problem and found this workaround:

<ice:column rowspan="2">
    <f:facet name="header">
            <h:outputText value="Name"/>
    </f:facet>
    <ice:panelGroup contextValue="#{car.Id}"
        menuPopup=":::myPopupmenu"
        value="">
        <ice:outputText value="#{car.carName}" />
    </ice:panelGroup>
</ice:column>

The trick seems to be set an empty string as value for the panelGroup.