GlobalPromptFaultDialog.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2001, 2011
  6. *|
  7. *| US Government Users Restricted Rights - Use, duplication or
  8. *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *|
  10. *+------------------------------------------------------------------------+
  11. */
  12. dojo.provide("GlobalPromptFaultDialog");
  13. dojo.require("FaultDialog");
  14. dojo.declare("GlobalPromptFaultDialog", FaultDialog, {
  15. m_sendRequestOnOK: false,
  16. setSendRequestOnOK: function( bSendRequestOnOK )
  17. {
  18. this.m_sendRequestOnOK = bSendRequestOnOK;
  19. },
  20. ok: function() {
  21. this.hide();
  22. this.m_oCV.getViewerWidget().disableListenToForGlobalPrompt();
  23. // for certain errors, we need to submit a request on OK see bug 2711145
  24. if( this.m_sendRequestOnOK )
  25. {
  26. var retryEntry = this.m_oCV.getRetryDispatcherEntry();
  27. var formFields = null;
  28. if (retryEntry) {
  29. formFields = retryEntry.getOriginalFormFields();
  30. }
  31. else {
  32. formFields = this.m_oCV.getViewerWidget().getOriginalFormFields();
  33. }
  34. if (formFields && formFields.exists( "widget.globalPromptInfo")) {
  35. formFields.remove("widget.globalPromptInfo");
  36. }
  37. this.retry();
  38. }
  39. }
  40. });