Answers for "StreamedContent primefaces 7"

0

StreamedContent primefaces 7

public StreamedContent getServicesInZip() {
	logger.info("getServicesInZip invoked {}", getUser());

	try {
		InputStream stream = new FileInputStream(BeanUtil.getSfContext().getServiceMarshalManager().packInZip(exportServices()));
		return new DefaultStreamedContent(stream, "application/zip", "Services.zip");
	} catch (FileNotFoundException e) {
		logger.error(e.getMessage(), e);
	}
	return null;
}
Posted by: Guest on August-13-2021

Browse Popular Code Answers by Language