I just came across this so I thought I should blog. I always used a custom UDF whenever I had to use dump inside cfscript and because I happen to write most of my code inside CFSCRIPT, I needed it a lot. But Apparently, you can do this as well using the adminapi.
[xml]
<cfscript>
adminapi = createObject("component","cfide.adminapi.security");
myVar = "hello world";
adminapi.dump(myVar);
</cfscript>[/xml]
Update : Looks like the security cfc extends the base cfc so it would be more ideal to do this I guess.
[xml]
<cfscript>
adminapi = createObject("component","cfide.adminapi.base");
myVar = "hello world";
adminapi.dump(myVar);
</cfscript>[/xml]
That’s a pretty cool tip. Thanks.
Yeah I liked it as well. Looks like this is the only method that doesnt require you to login. All other methods inside the adminapi require you to be logged in. Thats what I found out.
Hi Anug,
Great Tip!.. It even worked when I tried to dump the adminapi variable itselef like this.
adminapi=CreateObject(“component”,”cfide.adminapi.security”);
myvar=”Welcome”;
adminapi.dump(adminapi);
Cool!.
Thanks,
Dav R
Sorry.. I should have typed that as “adminapi” object!.
@Dav, Thats right. DUMP would work on any CF object I guess. Glad you liked it.
Wicked. Exactly what I was looking for. Thank you.
Thank you, cool and interesting one.
Thanks for the help with that. I’m getting into programming stuff more and more lately so I’m always on the lookout for something that will either save me time or make my life easier.
Thanks for sharing your code snippets since this would certainly help me with some instances. And I have tried to trace and understand the flow of it so that I could modify it and enhance it’s procedures.