Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling back bean

 
Dura Hurtado
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am trying call a method this way:

<p:fileUpload fileUploadListener="#{Content.handleFileUpload}"
allowTypes="*.jpg;*.png;*.gif;"/>

And the method is:

public void handleFileUpload(FileUploadEvent event) {
// logger.info("Uploaded: {}", event.getFile().getFileName());
System.out.println("-------------llegaaaaaaaaaaaa");
FacesMessage msg = new FacesMessage("Succesful", event.getFile().getFileName() + " is uploaded.");
System.out.println("image------------------------------------"+event.getFile().getFileName());
this.setImage(event.getFile().getFileName());

FacesContext.getCurrentInstance().addMessage(null, msg);

this.inImageDDBB();
}


But in the console nothing appears, I have anothers methods in the same file and they works well.

┬┐Any clue?

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic