On one of the CAF pages I am trying to place a link which would open the PDF in a new Tab.
I have used CommandLink that executes an action(snippet below) and set the property Expert–>Target as _blank
String output =getReadPDFFile().getResult().getReadPDFFileResponse().getOutput(); byte arq = javax.xml.bind.DatatypeConverter.parseBase64Binary(output); IFileExportBean exportBean = new SimpleFileExportBean("test.pdf", "application/pdf ", arq.length, false, arq); streamFileDataToResponse(exportBean);
while this works fine in Chrome opening PDF in new tab. In IE it fails with page displaying “This page can’t be displayed”.
Also, when I change Target to _self, the PDF does open in same tab for both Chrome and IE but the requirement here is to open it in New Tab.
Any suggestions why it is so or if there is other way of achieving this?