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 4 years, 7 months ago.

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

    BianyBarl
    Member

    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)

    <p:column>

    <f:facet name=”header”>

    <h:outputText value=”Filename” />

    </f:facet>

    <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}” />

    </h:link>

    </p:column>

    Same problem with dataExporter

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

    thanks

    #23136

    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:

    http://ocpsoft.org/prettyfaces/serving-dynamic-file-content-with-prettyfaces/

    #23137

    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)

You must be logged in to reply to this topic.

Comments are closed.