Have the same problem
If I use p:commandLink ajax="false":
Code: Select all
<p:column styleClass="column_center">
<f:facet name="header">
<h:outputText value='Report'/>
</f:facet>
<p:commandLink ajax="false">
<qp:imageButton type="#{imageType.getXLS_SMALL()}" title="#{res['image.title.xls']}"/>
<p:fileDownload value="#{fileBB.getFileDownload(item.settlementFileInfoId)}"/>
</p:commandLink>
</p:column>
<p:column styleClass="column_center">
<f:facet name="header">
<h:outputText value='Invoice'/>
</f:facet>
<p:commandLink ajax="false">
<qp:imageButton type="#{imageType.getXLS_SMALL()}" title="#{res['image.title.xls']}"/>
<p:fileDownload value="#{fileBB.getFileDownload(item.invoiceFileInfoId)}"/>
</p:commandLink>
</p:column>
Then when click on first link I receive first file. Then I click on the second link and receive the same file.
Because for second links method fileBB.getFileDownload calls twice - for first link and for second.
Using h:commandLink ajax="false" - solve the problem