Hi ,
I have a situation where in CAF i need to download the Document from UI page…
Can any one suggest which command control to be used.
Thanks in Advance.
Hi ,
I have a situation where in CAF i need to download the Document from UI page…
Can any one suggest which command control to be used.
Thanks in Advance.
Hi,
Downloaded document need to be maintained in the file server location.
In CAF, “Command Link” control can be used to download the document. In the action of this contol, the below code segment can be used.
fileIn = new FileInputStream(storedFilePath);
byte bytes = IOUtils.toByteArray(fileIn);
fileIn.close();
int contentLength = bytes.length;
boolean forceDownload = true;
streamFileDataToResponse(new SimpleFileExportBean(fileName, fileContentType, contentLength, forceDownload, bytes));