I'm using <p:fileUpload>
in a <p:dataTable>
. Upload works fine, but I'd like to know the currently iterated row in listener method so that I can update the right row in my DB.
XHTML:
<p:fileUpload fileUploadListener="#{doorBean.handleFileUpload}"
mode="advanced" dragDropSupport="false" update="messages"
sizeLimit="3000000"
allowTypes="/(\.|\/)(gif|jpe?g|png)$/" />
Bean:
public void handleFileUpload(FileUploadEvent event) {
this.file = event.getFile();
...
}
How can I achieve this? Can I pass an additional parameter to the bean?