DrillResetAction.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. function DrillResetAction(){
  13. this.m_sAction = "DrillDown";
  14. this.m_sharePromptValues = null;
  15. this.m_aDrilledResetHUNs = null;
  16. this.m_updateInfoBar = true;
  17. };
  18. DrillResetAction.prototype = new ModifyReportAction();
  19. DrillResetAction.prototype.setRequestParms = function(params) {
  20. this.m_aDrilledResetHUNs = params.drilledResetHUNs;
  21. this.m_sharePromptValues = params.promptValues;
  22. };
  23. DrillResetAction.prototype.addAdditionalOptions = function( oReq ) {
  24. if( !this.m_oCV ) { return; }
  25. if( !this.m_sharePromptValues ){
  26. /**
  27. * The format of prompt values from prompt control is different from that of the
  28. * share prompt event, therefore, need to prepare it differently
  29. */
  30. this.m_oCV.preparePromptValues( oReq );
  31. oReq.getRequestHandler().setForceRaiseSharePrompt(true);
  32. }else{
  33. if( !this.m_sharePromptValues ){
  34. return;
  35. }
  36. for (var promptValue in this.m_sharePromptValues){
  37. oReq.addFormField( promptValue, this.m_sharePromptValues[promptValue] );
  38. }
  39. }
  40. };
  41. DrillResetAction.prototype.addActionContextAdditionalParms = function(){
  42. var additionalContext = '<HUNS>';
  43. for( var i = 0; i < this.m_aDrilledResetHUNs.length ; i++ ){
  44. additionalContext += '<HUN>' + xml_encode( this.m_aDrilledResetHUNs[i] ) +'</HUN>';
  45. }
  46. additionalContext += '</HUNS>';
  47. additionalContext += '<action>resetDimension</action>';
  48. return additionalContext;
  49. };
  50. DrillResetAction.prototype.setUpdateInfoBar = function( bUpdate ){
  51. this.m_updateInfoBar = bUpdate;
  52. }
  53. DrillResetAction.prototype.updateInfoBar = function() {
  54. this.m_updateInfoBar;
  55. };