/examples/api_coldspring/Application.cfc

http://github.com/atuttle/Taffy · ColdFusion CFScript · 23 lines · 16 code · 6 blank · 1 comment · 0 complexity · 283187fd545c4097f36d40b5783273e6 MD5 · raw file

  1. <cfcomponent extends="taffy.core.api">
  2. <cfscript>
  3. this.name = hash(getCurrentTemplatePath());
  4. variables.framework = {};
  5. variables.framework.debugKey = "debug";
  6. variables.framework.reloadKey = "reload";
  7. variables.framework.reloadPassword = "true";
  8. variables.framework.serializer = "taffy.core.nativeJsonSerializer";
  9. function onApplicationStart(){
  10. application.beanFactory = createObject("component", "coldspring.beans.DefaultXMLBeanFactory");
  11. application.beanFactory.loadBeans('/taffy/examples/api_coldspring/config/coldspring.xml');
  12. //note that we're modifying variables.framework here, after the application variable has been set
  13. variables.framework.beanFactory = application.beanFactory;
  14. return super.onApplicationStart();
  15. }
  16. </cfscript>
  17. </cfcomponent>