Search code examples
jsfliferayportleticefaces

ICEfaces dataExporter unable to export files


I have a very simple example using an ace:dataTable and ace:dataExporter component, where the ace:dataExporter does not export the table to a downloadable file when clicked. I'm using these components in a Liferay 6.2 + Tomcat 7 JSF portlet environment with ICEfaces 3.3.0 P02.

The error in my tomcat log:

14:10:46,669 ERROR [MissingResourceImpl:78] Resource handler=[com.liferay.faces.
bridge.application.ResourceHandlerOuterImpl@66e6676f] was unable to create a res
ource for resourceName=[s4107aa8f-7a4e-4dd3-a2fc-8a18aa77ecb8] libraryName=[null
] contentType=[null]
14:10:46,670 ERROR [MissingResourceImpl:136] Resource handler=[com.liferay.faces
.bridge.application.ResourceHandlerOuterImpl@66e6676f] was unable to create a re
source for resourceName=[s4107aa8f-7a4e-4dd3-a2fc-8a18aa77ecb8] libraryName=[nul
l] contentType=[null]
14:10:46,671 WARN [ResourceImpl:166] Unable to determine if user agent needs up
date because resource URL was null for resourceName=[s4107aa8f-7a4e-4dd3-a2fc-8a
18aa77ecb8]. 

Relevant part of my view.xhtml:

<ace:dataExporter id="dataExportExample" fileName="identities" target="identityData" type="csv" />
<ace:dataTable id="identityData"
               value="#{simpleTableBean.identities}"
               var="identity"
               paginator="true"
               rows="15">
    <ace:column headerText="id">
        <h:outputText value="#{identity.id}" />
    </ace:column>
    <ace:column headerText="name">
        <h:outputText value="#{identity.name}" />
    </ace:column>
</ace:dataTable>

Solution

  • The problem was due to missing the dependency liferay-faces-1917-lsv-5-patch version 3.2.4-ga5. It was fixed by adding

    <dependency>
        <groupId>com.liferay.faces.patches</groupId>
        <artifactId>liferay-faces-1917-lsv-5-patch</artifactId>
        <version>3.2.4-ga5</version>
    </dependency>
    

    to my maven pom.xml.