Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 10th, 2012  |  syntax: None  |  size: 1.16 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to add spin.js to dialog
  2. <script type="text/javascript">
  3.     function showStatus() {
  4.         document.body.style.cursor = 'wait';
  5.         statusDialog.show();
  6.     }
  7.  
  8.     function hideStatus() {
  9.         document.body.style.cursor = 'default';
  10.         statusDialog.hide();
  11.     }
  12. </script>
  13.  
  14.  
  15. <p:commandButton id="genButton"
  16.                          value="Generate Files"
  17.                          widgetVar="startButton1"
  18.                          disabled="#{נean.disableButton}"
  19.                          actionListener="#{bean.generateUdm}"
  20.                          onclick="PrimeFaces.monitorDownload(showStatus, hideStatus)"
  21.                          ajax="false"
  22.                          style="width:200px"
  23.                          icon="ui-icon-shuffle">
  24.             <p:fileDownload value="#{bean.streamedContent}"/>
  25.         </p:commandButton>
  26.  
  27.  
  28.   <p:dialog modal="true"
  29.               header="Generating fILE"
  30.               showHeader="true"
  31.               position="center"
  32.               widgetVar="statusDialog"
  33.               draggable="false"
  34.               closable="false"
  35.               resizable="false">
  36.  
  37.         ????????????? ADD SPIN ???????????
  38.     </p:dialog>