I am uploading csv file that have only one entry in it and after uploading when try to delete by selecting that entry delete is not firing for first time from second time it if firing working fine.
For that I am using p:fileUpload
jsf tag and in bean am uploading file.
JSF code :
<h:outputText value="Upload Numbers CSV file" style="font-weight:bold;font-size:9pt" />
<p:messages id="fileuploadmsg" autoUpdate="true"/>
<p:fileUpload fileUploadListener="#{ABean.uploadNumbers}"
allowTypes="/(\.|\/)(csv)$/" update="fileuploadmsg">
</p:fileUpload>
Java Method for upload :
public String uploadNumbers(FileUploadEvent event) {
//Upload part here After upload reloading page.
RequestContext.getCurrentInstance().execute("window.location.reload()");
}
** Note: I am getting this issue only when first and uploading only one entry**