I am trying to display the each file in alert box before i implements my own logic as per my requirements. But its not working.
<h:head>
<script type="text/javascript">
function displayEachFile(file,callback){
alert(file);
}
</script>
</h:head>
<h:body>
<div class="card">
<h:form name="download">
<p:fileUpload value="#{fileBean.files}" mode="advanced" multiple="true" auto="true"
listener="#{fileBean.handleFileUpload}" widgetVar="hello" onAdd="displayEachFile"/>
</h:form>
</div>
</h:body>
</html>