1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
private void sendPermisDeConstruire(String filename) {
LOG.debug("sendPermisDeConstruire " + filename ".docx");
FacesContext faces = FacesContext.getCurrentInstance();
try {
HttpSession session = (HttpSession) faces.getExternalContext()
.getSession(false);
session.setAttribute("fileName", filename);
// faces.getExternalContext().redirect
//("download-servlet");
JavascriptContext.addJavascriptCall(faces, "window.open('download-servlet?', \"popup2\", \"width=800, height=600\"");
} catch (Exception ex) {
LOG.error("Exception while redirecting : " + ex.getMessage());
}
} |
Partager