MissingMemberFaultDialog.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. *+------------------------------------------------------------------------+
  3. *| Licensed Materials - Property of IBM
  4. *| IBM Cognos Products: Viewer
  5. *| (C) Copyright IBM Corp. 2012, 2013
  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("MissingMemberFaultDialog");
  13. dojo.declare("MissingMemberFaultDialog", FaultDialog, {
  14. m_oCV: null,
  15. m_errorMessage: null,
  16. m_bHasBUACapability: false,
  17. m_bHasParameters: false,
  18. constructor: function(oCV, errorMessage, bHasBUACapability, bHasParameters) {
  19. this.m_errorMessage = errorMessage;
  20. this.m_bHasBUACapability = bHasBUACapability;
  21. this.m_bHasParameters = bHasParameters;
  22. },
  23. /*
  24. * Override
  25. */
  26. getErrorMessage: function() {
  27. return this.m_errorMessage;
  28. },
  29. /*
  30. * Override
  31. */
  32. canRetryRequest: function() {
  33. return false;
  34. },
  35. /*
  36. * Override
  37. */
  38. getButtons: function() {
  39. var buttons = [];
  40. if (this.m_bHasBUACapability) {
  41. buttons.push({
  42. label: RV_RES.IDS_JS_EDIT,
  43. action: dojo.hitch( this, this.invokeEditContentAction )
  44. });
  45. }
  46. buttons.push({
  47. label: RV_RES.IDS_JS_CLOSE,
  48. action: dojo.hitch( this, this.ok )
  49. });
  50. return buttons;
  51. },
  52. invokeEditContentAction: function() {
  53. var oParam = {};
  54. oParam.oFaultDialog = this;
  55. oParam.bHasParameters = this.m_bHasParameters;
  56. this.m_oCV.executeAction( "EditContent" , { "MissingMemberRecoveryMode": oParam});
  57. }
  58. });