Skip to content

Instantly share code, notes, and snippets.

@virtix
Created May 31, 2009 04:07
Show Gist options
  • Save virtix/120751 to your computer and use it in GitHub Desktop.
Save virtix/120751 to your computer and use it in GitHub Desktop.
function two_Totally_DumbAssWaysOfInvokingFunctionsUsingFusionContextAndCFCProxy(){
var ctx = getPageContext().getFusionContext();
var stupidCfcPath = ctx.parent.getDirectoryFromPath(ctx.getPagePath()) & 'PlainOldStupidAssCFC.cfc';
var cfcproxy = CreateObject("java", "coldfusion.cfc.CFCProxy").init(stupidCfcPath);
var args = ['dumb ass puke breath punk'];
var alias = cfcproxy.getMethod('echo');
assertEquals( args[1] , alias('dumb ass puke breath punk') );
assertEquals( args[1] , cfcproxy.invoke('echo', args) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment