I have been playing with the bean scripting framework stuff with CFMX and I
have a question that is probably not going to be able to be answered, but...

Does anyone know where cold fusion keeps it variable scopes? For reference
here is the BSF code (watch out for line wrap):

<cfset cfJavaScriptName="cfjava"/>

<cfsavecontent variable="#cfJavaScriptName#">
runtime;
</cfsavecontent>

<cfscript>
        //create a manager object
        manager = createObject("java","com.ibm.bsf.BSFManager");

        //registar beans to use
        //get the master factory
        factory = createObject("java","coldfusion.server.ServiceFactory");
        manager.declareBean("mail", factory.MailSpoolService,
factory.MailSpoolService.getClass());
        manager.declareBean("registry", factory.RegistryService,
factory.RegistryService.getClass());
        manager.declareBean("runtime", factory.RuntimeService,
factory.RuntimeService.getClass());

        //execute
        result = manager.eval("javascript", "#cfJavaScriptName#", 0, 0, cfjava);
</cfscript>

<cfdump var="#result#"/>


if you look at result you'll see it is indeed the RuntimeService and can
manipulate the cfadmin stuff, *but* there doesn't seem to be anyway to get
to scoped variables.

I.e. if I wanted to do:
<cfsavecontent variable="#cfJavaScriptName#">
variables.mypagelevelvar++;
</cfsavecontent>

where would I find the "variables" scope. (it's not runtime.getVariables());

I know I am way out there but any thoughts?



Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to