Commit 1fd46c4e by Tuukka Kivilahti

it's nice to have some name

1 parent d553d02f
......@@ -181,7 +181,8 @@ public class UserView extends GenericCDIView {
try {
mpr = cardPrintBean.getUserCardAsPrintablePdf(getSelectedUser().getId());
ByteArrayInputStream pdfstream = new ByteArrayInputStream(mpr.getPdf());
setStreamedFile(new DefaultStreamedContent(pdfstream));
setStreamedFile(new DefaultStreamedContent(pdfstream, "application/pdf","user_" + getSelectedUser().getId() + "_card.pdf"));
logger.info("user_" + getSelectedUser().getId() + "_card.pdf");
} catch (Exception e) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!