j2html.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // Licensed Materials - Property of IBM
  2. //
  3. // IBM Cognos Products: cogadmin
  4. //
  5. // (C) Copyright IBM Corp. 2005, 2010
  6. //
  7. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. //
  9. //
  10. // Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  11. // Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  12. //----------------------------------------------------------
  13. /* This class worked as a root js file for cogamdmin.
  14. *
  15. * It will include all the management related to the JS behaviour framework,
  16. * it shouldn't include any system related functions
  17. *
  18. * Also it will contain the zzcogadmin scope public variables and static variables.
  19. *
  20. * The included functionalities are: Namespace Mgt.
  21. * TODO: will include functionalities are: Modules Mgt, Dependency Import Mgt,
  22. *
  23. */
  24. if (typeof com == "undefined")
  25. var com = {};
  26. if (typeof com.cognos == "undefined")
  27. com.cognos = {};
  28. if (typeof com.cognos.admin == "undefined")
  29. com.cognos.admin = {};
  30. com.cognos.admin.ObjectFactory = function(objName) {
  31. var namespace = objName.split(".");
  32. var obj=window;
  33. for (var i=0; i < namespace.length;i++) {
  34. if (!obj[namespace[i]]) {
  35. obj = obj[namespace[i]] = {};
  36. } else {
  37. obj = obj[namespace[i]];
  38. if (typeof(obj) != "object")
  39. throw new Error(objName + " already exists and is not an object");
  40. }
  41. }
  42. return obj;
  43. };
  44. com.cognos.admin.VERSION = "0.1.0";
  45. //static variables for cogAdmin
  46. com.cognos.admin.GATEWAY = _F_Config.gateway ;
  47. com.cognos.admin.WEBCONTENT = _F_Config.webContent ;
  48. //public variables for cogAdmin
  49. com.cognos.admin.publicParam = {
  50. states:{}, // fragment based, store the client state in global scale.
  51. callbackEnv : {}, //for the situation from the outside of framework(e.g. legacy mophlet) want to go back.
  52. evtLoaded:{} //fragment based, protect the event handler from dup loaded.
  53. };
  54. //config variables for cogAdmin JS controller framework
  55. com.cognos.admin.config = {
  56. debug : true,
  57. dependencyControllerType : "fragment"
  58. };