FileDownload FileDownload is used to stream binary contents like files stored in database to the client. FileDownload is used by attaching it to any JSF command component like button or a link. Additionally presentation of download can be configured with the contentDisposition attribute that takes either "attachment" or "inline" as a value.
<p:dialog modal="true" widgetVar="statusDialog" header="Status" draggable="false" closable="false" resizable="false">
    <p:graphicImage name="/demo/images/ajaxloadingbar.gif" />

    <p:commandButton value="Download" ajax="false" onclick="PrimeFaces.monitorDownload(start, stop);" icon="ui-icon-arrowthick-1-s">
        <p:fileDownload value="#{fileDownloadView.file}" />

<script type="text/javascript">
function start() {

function stop() {
PrimeTek, Copyright © 2017
All rights reserved.
Running PrimeFaces-6.3-SNAPSHOT on Mojarra-2.3.2.