Someone asked me today when I was going to update my Application.cfc reference (linked to in the Guides pod to the left) for ColdFusion 8. I went ahead and did so. You can see the new guide here:
http://www.coldfusionjedi.com/downloads/application.cfc.txt
You will notice I changed to a text file for this one. I always found it bothersome that when I copied from the PDF, I lost my tabs. Since I'm a bit anal retentive about tabbing, I figured a simple txt file would be better. Shoot, this whole PDF thing is probably just a fad anyway.
I also included comments in this template. I didn't do it before because - well - I wanted folks to have something they could just cut and paste into a new file (or into a CFEclipse Snippet). But I figured one line comments can't hurt. If folks think it is a mistake, let me know. Again the intent here is to serve as a template, not really a learning guide. You will notice that in the official docs, they forgot some of the items you can include. For example, the reference guide forgot customtagpaths and mappings. The dev guide has them - but forgot the other new This scope items like secureJSON. (I've logged bugs for both of these issues.)
Lastly - I've kept the CF7 version linked as well.
Comment 1 written by Andy Matthews on 5 November 2007, at 4:56 PM
:)
Thanks Ray...the tutes and assistance you give are always top notch. Appreciated.
Comment 2 written by Raymond Camden on 5 November 2007, at 5:00 PM
Comment 3 written by Jeff Fleitz on 6 November 2007, at 6:45 AM
Thanks!
Comment 4 written by Daniel Greenfeld on 6 November 2007, at 9:17 AM
Comment 5 written by brian on 6 November 2007, at 5:58 PM
Comment 6 written by Raymond Camden on 6 November 2007, at 7:55 PM
Comment 7 written by brian on 7 November 2007, at 2:43 AM
<cfset StructDelete( THIS, "OnRequest" ) />
<cfset StructDelete(variables,"onRequest")/>
</cfif>
otherwise my cfselect binding to a cfc in the same directory doesn't work.
Comment 8 written by Raymond Camden on 7 November 2007, at 8:30 AM
Hmmmm. What do people think? What if I add an additional comment with very obvious warnings:
<!--- NOTE THAT THIS METHOD DISABLES CFC CALLS --->
And maybe I can link to an a blog entry on the method you described?
Comment 9 written by brian on 7 November 2007, at 11:51 AM
Comment 10 written by Justin Schier on 13 October 2008, at 7:04 PM
BUT!
Today I was working on some Ajax calls direct to a CFC and they were returning a blank page. I could not figure out why for 2 hours until I found this page.
As soon as I put in Brian's code, it started working as expected. (THANK YOU BRIAN!)
What the F is up with having to do that?? Why does your template not work with direct calls to CFCs? I'm an advanced CF developer and you've got me on this one.
Anyway, it's not "very obvious" to me, sorry. I wish you would have put that comment in, as well as some kind of explanation WHY it disables CFC calls and HOW to enable them.
Thanks very much for all you do!!
Justin
Comment 11 written by Raymond Camden on 13 October 2008, at 8:03 PM
Comment 12 written by Will on 13 March 2009, at 12:38 PM
Comment 13 written by Raymond Camden on 13 March 2009, at 12:48 PM
Comment 14 written by Will Broadhead on 13 March 2009, at 3:13 PM
It consumes the url vars as both url and argument input. I just output from onRequestStart and the called function to screen to test:
SIMPLE FUNCTION:
ffunction name="fn_TestGateway" access="remote" returntype="any" hint="TEST" >
<cfargument name='testytester'>
<HR/>fn_TestGateway HAS RUN CORRECTLY...<HR/>
<cfif isDefined('arguments.testytester')>ARGUMENT: <cfoutput>#arguments.testytester#</cfoutput><br /></cfif>
<cfif isDefined('url.testytester')>URL: <cfoutput>#URL.testytester#</cfoutput><br /></cfif>
</cffunction>
REQUEST:
http://mfi/_code/_application/_initializeApplicati...
RESULT:
- in onRequestStart - x=123
fn_TestGateway HAS RUN CORRECTLY... ARGUMENT: howdy
URL: howdy
Comment 15 written by Will Broadhead on 17 March 2009, at 8:06 PM
Comment 16 written by Phil Williams on 30 July 2009, at 6:46 AM
I must be going blind but I can't find the link to the MX7 version of your template, could you post a link?
Thanks...
Phil
Comment 17 written by Raymond Camden on 30 July 2009, at 11:23 PM
Comment 18 written by Phil Williams on 31 July 2009, at 2:42 AM
On a side note, I've downloaded BlogCFC and found a couple of issues, where would be the best place to report them? Excellent application overall though...
Phil
Comment 19 written by Raymond Camden on 1 August 2009, at 3:23 PM
http://blogcfc.riaforge.org
[Add Comment] [Subscribe to Comments]