where should i upload a dcoument which i need to use in CAF application.And command control in CAF

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));