JARCH SHOWCASE
JARCH SHOWCASE
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.
Status
<a:dialog modal="true" widgetVar="statusDialog" header="Status" draggable="false" closable="false" resizable="false">
    <a:graphicImage name="/demo/images/ajaxloadingbar.gif" />
</a:dialog>

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

<script type="text/javascript">
function start() {
    PF('statusDialog').show();
}

function stop() {
    PF('statusDialog').hide();
}
</script>
                
JARCH, Copyright © 2022 All rights reserved. Running JARCH 24.3.0-SNAPSHOT on PrimeFaces-12.0.0 on Mojarra-2.3.13.