Primeface를 구현하는 경우 FileSown UserGuide에있는 FileDownload 클래스는 set 메소드가 void를 반환하거나 생성자로 변경하는 것을 보여주는 IDE입니다. 정확한 문제가 무엇인지Primefaces filedownload 클래스 구현 오류
공공 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;
}
}
. 클래스가 다른 이름을 가지고
public FileDownloadController() to public FileBean()
변화는'공공 FileDownloadController() {'공공 무효 FileDownloadController'로() {' – Daniel
는 – mdp
정답 같은 대답을 선택하십시오. – alfonx