Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

primefaces download file

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

    function stop() {
        PF('statusDialog').hide();
    }
    //]]>
</script>

<div class="card">
    <p:dialog modal="true" widgetVar="statusDialog" header="Status" draggable="false" closable="false"
              resizable="false">
              <i class="pi pi-spinner pi-spin" style="font-size:3rem"></i>
    </p:dialog>

    <h:form>
        <p:commandButton value="Download" ajax="false" onclick="PrimeFaces.monitorDownload(start, stop);"
                         icon="pi pi-arrow-down" styleClass="p-mr-2">
            <p:fileDownload value="#{fileDownloadView.file}"/>
        </p:commandButton>

        <p:commandButton value="Ajax Download" icon="pi pi-arrow-down" styleClass="ui-button-outlined">
            <p:fileDownload value="#{fileDownloadView.file}"/>
        </p:commandButton>
    </h:form>
</div>
Comment

PREVIOUS NEXT
Code Example
Java :: how to initialize a string in java 
Java :: create a hashmap 
Java :: java math ceil 
Java :: JFrame frame = new JFrame (); 
Java :: android studio setBackground 
Java :: arrays.sort with comparator 
Java :: java system.out.println not working 
Java :: java list last element 
Java :: get data from database sqlite android 
Java :: string palindrome in java 
Java :: how to find sum of the digit of the numbers in java 
Java :: calling this in constructor java 
Java :: wait method in java 
Java :: add int to list java 
Java :: junit check class type 
Java :: java max value between two numbers 
Java :: spring convert page to list 
Java :: spring xml configuration 
Java :: java string equal 
Java :: check if char is letter or digit 
Java :: java static variable 
Java :: mongodb check if field exists java 
Java :: new thrad java 
Java :: erstelle hashmap java 
Java :: locked screen android studio 
Java :: find the unique element in a list java 
Java :: java xml element get attribute value 
Java :: calendar check if month is 30 days 
Java :: java make object 
Java :: java local function 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =