When I Implement primefaces FileDownload Class which is in Primefaces UserGuide at this point my IDE showing set method return type to void or change to constructor.
public FileDownloadController()
public class FileBean {
private StreamedContent file;
public FileDownloadController() {
InputStream stream = this.getClass().getResourceAsStream("yourfile.pdf");
file = new DefaultStreamedContent(stream, "application/pdf",
"downloaded_file.pdf");
}
public StreamedContent getFile() {
return this.file;
}
}
what is the exact problem.
change your code to like this..
package org.primefaces.examples.view;