ICEfaces libary no classpath impede que a caixa de diálogo Salvar como seja exibida no download do arquivo
Assim que eu adicionar as bibliotecas icefaces.jar icepush.jar icefaces_ace.jar ao meu classpath para usar componentes ACE, minha caixa de diálogo SaveAs não irá aparecer? Eu não tenho certeza se isso é um bug, mas sem as bibliotecas no caminho de classe funciona. Aqui está o meu salvar como método:
public void downloadFile(String propertyPath) throws IOException {
ProxyFile fileToDownload = repBean.downloadFile(propertyPath);
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
response.reset(); response.setContentType(fileToDownload.getContentType());
response.setHeader("Content-Length", String.valueOf(fileToDownload.getLength()));
response.setHeader("Content-disposition", "attachment; filename=\"" + fileToDownload.getName() + "\"");
BufferedInputStream input = null;
BufferedOutputStream output = null;
try {
input = new BufferedInputStream(fileToDownload.getContent());
output = new BufferedOutputStream(response.getOutputStream());
byte[] buffer = new byte[10240];
for (int length; (length = input.read(buffer)) > 0;) {
output.write(buffer, 0, length);
}
} finally {
output.close();
input.close();
facesContext.responseComplete();
}
}