ReportInfoDispatcherEntry.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2001, 2012
  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. /*
  13. *******************************************************************************
  14. *** View DispatcherEntry.js for information on the dispatcher entry classes ***
  15. *******************************************************************************
  16. */
  17. function ReportInfoDispatcherEntry(oCV)
  18. {
  19. ReportInfoDispatcherEntry.baseConstructor.call(this, oCV);
  20. if (oCV) {
  21. this.setCallbacks( {
  22. "complete" : {"object" : this, "method" : this.onComplete },
  23. "prompting": {"object": this, "method": this.onPrompting}
  24. });
  25. this.getRequestHandler().setFaultDialog(new ModalFaultDialog(oCV));
  26. }
  27. }
  28. ReportInfoDispatcherEntry.prototype = new AsynchJSONDispatcherEntry();
  29. ReportInfoDispatcherEntry.baseConstructor = AsynchJSONDispatcherEntry;
  30. ReportInfoDispatcherEntry.prototype.initializeAction = function(action)
  31. {
  32. this.setKey(action.getActionKey());
  33. this.setCanBeQueued(action.canBeQueued());
  34. this.m_action = action;
  35. };
  36. ReportInfoDispatcherEntry.prototype.getAction = function() {
  37. return this.m_action;
  38. };
  39. ReportInfoDispatcherEntry.prototype.prepareRequest = function()
  40. {
  41. var actionFormFields = new ActionFormFields(this);
  42. actionFormFields.addFormFields();
  43. };
  44. ReportInfoDispatcherEntry.prototype.onComplete = function(asynchJSONResponse, arg1)
  45. {
  46. //The request for a single entry has completed...
  47. if (this.m_oCV.getViewerDispatcher().queueIsEmpty()==true) {
  48. var callbackFunction = this.m_action.getOnCompleteCallback();
  49. callbackFunction(asynchJSONResponse);
  50. }
  51. };
  52. ReportInfoDispatcherEntry.prototype.onPrompting = function(asynchJSONResponse, arg1)
  53. {
  54. var callbackFunction = this.m_action.getOnPromptingCallback();
  55. callbackFunction(asynchJSONResponse);
  56. };
  57. ReportInfoDispatcherEntry.prototype.onPostEntryComplete = function()
  58. {
  59. var oCV = this.getViewer();
  60. if (oCV && oCV.getViewerWidget()) {
  61. var cvWidget = oCV.getViewerWidget();
  62. cvWidget.getLoadManager().processQueue();
  63. }
  64. };