We're speaking at
CFUnited 2008:
CFUnited - The Premiere ColdFusion Technical Conference

Search

Calendar

SunMonTueWedThuFriSat
  12345
6789101112
13141516171819
20212223242526
2728293031    

Subscribe Enter your email address to subscribe to this blog. You'll receive an email when we write a new post.

Recent Entries ColdFusion SQL Injection
How to make the full path appear in the finder title (OS X)

Recent Comments Enabling desktop wallpaper on remote desktop terminal services
tstevens said: Worked like a champ for me! This was driving me crazy. Wasn't sure if it was my RDP config, my virtu... [more]

ColdFusion SQL Injection
Dan G. Switzer, II said: I was having problems with the script doing weird things do to the logic used to find the open CFQUE... [more]

ColdFusion SQL Injection
Brad Wood said: Duncan, I have already blogged a fix to make it scan .cfm, .cfml, and .cfc files. http://www.codersr... [more]

ColdFusion SQL Injection
duncan said: Also doesn't seem to work where a query would have a LIKE in it, e.g. WHERE name like '#form.name#%... [more]

ColdFusion SQL Injection
duncan said: What about changing it to also scan .cfc files? [more]

Archives By Subject Business of Software (5) [RSS]
ColdFusion (321) [RSS]
Conferences (7) [RSS]
Databases (88) [RSS]
Flex & Flash (109) [RSS]
Fusebox (87) [RSS]
General Development (33) [RSS]
Google (9) [RSS]
Hardware (5) [RSS]
JVM & Java (132) [RSS]
Linux (20) [RSS]
Macintosh (1) [RSS]
Miscellaneous (254) [RSS]
Performance (8) [RSS]
SeeFusion (36) [RSS]
Shan's Simple Examples (7) [RSS]
User Interface (3) [RSS]
Windows (5) [RSS]

Archives By Poster Daryl Banttari (11)
Nat Papovich (33)
Patrick Quinn (36)
Shannon Hicks (22)
Steve Nelson (22)
Tyson Vanek (3)


bottom corner

MissingFuse handler for Fusebox5 development

I've been building a new FB5 application for the last couple months and have found myself adding fuses on a daily basis. My natural development process is to make the circuit.xml then go back and add the fuses. But sometimes I get out of order and try to hit a fuseaction in my browser before I've even made the empty fuse, resulting in a missing .cfm error.

To assist in this aspect of development, I've created a simple fusebox.missingFuse.cfm errortemplate.

This errortemplate creates all missing fuses <include>d in circuit.xml for the currently-executing Fuseaction request. The first missing include is caught, handled by the errortemplate, then the page is refreshed automatically. In the case of a second missing <include>, it will again get caught and written. Ad nauseum. Helpful for, say, the act_file, the other act_file, then the dsp_file.

Download the file by clicking the teeny little "Download" link at the bottom of this post, and drop the .cfm into your errortemplates folder. Whenever the Fusebox cores hit a missing fuse in circuit.xml, it will be automatically created for you.

Modify line 1 if you're using development-circuit-load. If you wanted to enable this errortemplate in production mode, you could, for example, modify line 1 to work in production mode as well as, for example, send you an email message when it encountered a missing fuse rather than write out an empty fuse like it does now.

Enjoy!

Related Blog Entries

Comments
Nat,

Congratulations on the new job. I like the idea of the missing template handler creating fuses. Just a pity it can't add the code too!
# Posted By Kevin Roche | 10/13/06 1:52 AM
Hi Kevin - Are you coming to MAX? I'll be there. I spent weeks and weeks trying to make the error template write the correct code. I tried inferring the purpose from the fuse name, looking into application-scoped factories for matching names, introspecting method names, peering at the attributes scope, correlating the fuse position in the circuit hierarchy. But then I gave up.

No I didn't. Just kidding. But wouldn't that be cool?!
# Posted By Nat Papovich | 10/13/06 9:21 AM

bottom corner