Is it posible to do this?
Code: Select all
<p:fileUpload fileUploadListener="#{EditNetwork.handleFileUpload}" update="msgs">
<f:param name="location" value="TestLocation"/>
</p:fileUpload>
Code: Select all
public void handleFileUpload(FileUploadEvent event, String location) {
FacesMessage msg = new FacesMessage("Succesful", event.getFile().getFileName() + " is uploaded. Location: " + location);
FacesContext.getCurrentInstance().addMessage(null, msg);
}