RetryRequestAction.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. function RetryRequestAction()
  13. {
  14. this.m_lastActionParams = null;
  15. }
  16. RetryRequestAction.prototype = new CognosViewerAction();
  17. RetryRequestAction.prototype.setRequestParms = function(parms)
  18. {
  19. this.m_lastActionParams = parms;
  20. };
  21. RetryRequestAction.prototype.execute = function()
  22. {
  23. if (this.m_lastActionParams) {
  24. var request = new ViewerDispatcherEntry(this.m_oCV);
  25. var formFieldNames = this.m_lastActionParams.keys();
  26. for (var index = 0; index < formFieldNames.length; index++) {
  27. request.addFormField(formFieldNames[index], this.m_lastActionParams.get(formFieldNames[index]));
  28. }
  29. request.addFormField("cv.responseFormat", "data");
  30. request.addFormField("widget.reloadToolbar", "true");
  31. request.addNonEmptyStringFormField("limitedInteractiveMode", this.m_oCV.envParams["limitedInteractiveMode"]);
  32. this.m_oCV.dispatchRequest(request);
  33. this.m_oCV.getViewerWidget().setOriginalFormFields(null);
  34. }
  35. };