RepromptAction.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2001, 2014
  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. function RepromptAction()
  13. {
  14. this.m_repromptAction = null;
  15. }
  16. RepromptAction.prototype = new CognosViewerAction();
  17. RepromptAction.superclass = CognosViewerAction.prototype;
  18. RepromptAction.prototype.updateMenu = function( jsonSpec )
  19. {
  20. var oCV = this.getCognosViewer();
  21. jsonSpec.visible = (!this.isPromptWidget() && oCV.hasPrompt() );
  22. if (!jsonSpec.visible) {
  23. jsonSpec.save = true;
  24. } else {
  25. delete jsonSpec.save;
  26. }
  27. return jsonSpec;
  28. };
  29. RepromptAction.prototype.setRequestParms = function(params) {
  30. RepromptAction.superclass.setRequestParms(params);
  31. if (params && params["preferencesChanged"]) {
  32. this["preferencesChanged"] = params["preferencesChanged"];
  33. }
  34. };
  35. RepromptAction.prototype.execute = function()
  36. {
  37. var oCV = this.getCognosViewer();
  38. if( oCV.isLimitedInteractiveMode())
  39. {
  40. this.m_repromptAction = new RepromptRunAction();
  41. }
  42. else
  43. {
  44. this.m_repromptAction = new RepromptRAPAction();
  45. }
  46. this.m_repromptAction.setCognosViewer( oCV );
  47. if (this["preferencesChanged"]) {
  48. this.m_repromptAction.reuseConversation(false);
  49. }
  50. this.m_repromptAction.execute();
  51. };