Two Laptop Bag*
The moose likes JSF and the fly likes calling back bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "calling back bean" Watch "calling back bean" New topic
Author

calling back bean

Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
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
 
Consider Paul's rocket mass heater.
 
subject: calling back bean
 
Similar Threads
upload file jsf
Displaying FacesMessage when a RemoteException or SOAPException occurs
Upload
primefaces fileupload doesn't work
How to pass more than 1 parameters into the sevlet???