Created
May 31, 2009 04:07
-
-
Save virtix/120751 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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