p:fileDownload and p:dataExporter

Splash Forums PrettyFaces Users p:fileDownload and p:dataExporter

This topic contains 2 replies, has 3 voices, and was last updated by  Lincoln Baxter III 9 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #18834


    HI All,

    i-m using primefaces 3.4 with glassfish 3.x and prettyfaces.

    I have a datatable last column is a file different for each row, i want use pretty faces to creata dinamically a link for download file, If i use h:link i have an exception:

    java.lang.ClassCastException: javax.faces.component.html.HtmlOutcomeTargetLink cannot be cast to javax.faces.component.ActionSource

    at org.primefaces.component.filedownload.FileDownloadTagHandler.apply(FileDownloadTagHandler.java:51)


    <f:facet name=”header”>

    <h:outputText value=”Filename” />


    <h:outputText rendered=”#{cam.idFile!=null}” style=”display: inherit” value=”#{cam.filename}” />

    <h:link outcome=”pretty:goDettaglioPretty” style=”display: inherit” value=”File ” >

    <f:param name=”categoria” value=”#{cam.filename}” />

    <p:fileDownload contentDisposition=”attachment” value=”#{cam.contratto.fileContratto}” />



    Same problem with dataExporter

    Somebody can help me, with example with dataExporter or p:fileDownload



    I don’t know p:fileDownload, but I don’t think, that it will work with PrettyFaces outcomes.

    I for myself usually use this pattern for downloads in web applications:



    This doesn’t seem like a bug with PrettyFaces. Please post an example application that reproduces this problem and give more information about the configuration of your project.

Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.