I have acefaces datatable with file names, one on row and I'm trying to add a download button using ice:outputResource, but I fails in sending the filename to outputResourceBean.
My datatable looks like:
<h:form id="exportedFiles">
<ace:dataTable value="#{exportBean.allFiles}" var="upload"
<ace:column>
<f:facet name="header" >
<h:outputText value="Název souboru"/>
</f:facet>
<h:outputText value="#{upload.name}"/>
</ace:column>
<ace:column>
<f:facet name="header" >
<h:outputText value="Dowload file"/>
</f:facet>
<ice:outputResource id="downLink"
resource="#{outputResource.pdfResource}"
attachment="true"
label="Download PDF"
type="button">
</ice:outputResource>
</ace:column>
</ace:dataTable>
</h:form>
And my bean look like this:
public static final String PDF_NAME = "Download_PDF.pdf";
public static final Resource PDF_RESOURCE = new MyResource(PDF_NAME);
public String getPdfName() { return PDF_NAME; }
public Resource getPdfResource() { return PDF_RESOURCE; }
I can get the filename using #{upload.name} but I have no idea how to send it to bean when clicking the Download button...
Thanks for help in advance!