NO MORE CAREER
POLITICIANS!
Get Out Of Our House: Replacing congress with TRUE citizens!
Contact Doug!
Learn About Doug!
View Doug Boude's online resume
updated 11/18/2009

View Doug Boude's profile on LinkedIn
Link to me!

Follow Doug Boude on Twitter
Follow me!

Be Doug's friend on Facebook
Befriend me!
(I promise not to follow you home)
OO Lexicon
Chat with Doug!
Recent Entries
You may also be interested in...
Web Hosting

best web hosting - top web hosting sites, thetop10bestwebhosting.com

Czech your Page Rank!
Check Page Rank of any web site pages instantly:
This free page rank checking tool is powered by Page Rank Checker service
Surf's Up!
Visit Egosurf.org and massage YOUR web ego!
My Score: 9,001
Doug's Books

Read (and recommend)

  • Men are from Mars, Women are from Venus
  • The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies and Nations
  • Blink: The Power of Thinking Without Thinking
  • Head First Design Patterns
  • Transact-SQL Programming
  • What's So Amazing About Grace?
  • Just So Stories (Rudyard Kipling collection)

Reading

  • Prayer: Does it Make Any Difference?
  • Data Mining (Practical Machine Learning Tools and Techniques)
<< September, 2010 >>
SMTWTFS
1234
567891011
12131415161718
19202122232425
2627282930
Search Blog

Recent Comments
Re: Railo 3.1 on Windows Server 2008 and IIS7 - Part 3 of 3 (by Jon at 8/27 2:04 PM)
Re: Hosts File Changes Not Acknowledged on Vista 64 (by Spacy at 8/24 3:46 PM)
Re: THE DAY CFUNITED DIED (by ComboFusion at 8/23 10:50 AM)
Re: My Grandpa (by Tasha at 8/10 4:29 PM)
Re: Just What IS a 'Service Layer', Anyway? (by dougboude at 8/02 10:10 AM)
Re: Just What IS a 'Service Layer', Anyway? (by Isaac at 8/02 2:25 AM)
Re: PayPal IPN Coldfusion CFC (by Soyestudiambre at 7/25 6:12 PM)
Re: PHP vs COLDFUSION (by Tony Garcia at 7/17 11:24 AM)
Re: PHP vs COLDFUSION (by dougboude at 7/14 8:45 AM)
Re: PHP vs COLDFUSION (by Lola LB at 7/14 5:51 AM)
Categories
Archives
Photo Albums
Funnies (5)
Family (3)
RSS

Powered by
BlogCFM v1.11

29 June 2008
My FB 5.5+ Content Pulled a David Blaine!
FB 5.5+ for Model-Gluers
For any of you Model-gluers out there who are dabbling in Fusebox 5.5+ (which I happen to be for a current client project), I came across a hair-pulling situation that I wanted to share with you in the hopes that you'll not have to endure the same.

The symptom: you wrote a perfectly good controller method that is being called and, according to the debugging, is rendering all of your content just fine. But, your final page returns completely empty! It's just gone, not there, not even a single line in your page's source. Poof! It pulled a David Blaine. After spending more time on this than I care to admit, following are the details of the issue and the solution.

The Cause and Solution
You know how in your MG controllers and model CFCs you're in the habit of typing out all of your attributes and their values when declaring a new CFFUNCTION (such as, "<cffunction name="getEntityDetails" output="false" access="public">")? And, you know how in MG, 99.9% of the time, your methods don't need to render any output and so you set the output attribute to "false" just out of habit? Well, if you're using FB 5.5+ (at least in the 'no xml' mode, which is what I'm doing), you have to be mindful NOT to set the output attribute to false if your method is going to render any page output (which is the way to do it in FB 5.5+ in the 'no-xml' mode). You may be saying "duh, if it's rendering output of COURSE you wouldn't set output="false"! But, typically if a method is going to render output, it's going to do so with either cfoutput tags or the like, which would trigger your programmer mind to remind you to change the output attribute. In the approach that FB 5.5+ takes to do this, however, the natural mechanism that would trigger your mind to make the output value change isn't tripped, because we're just not used to seeing it done that way (eg; <cfset myFusebox.do( action="layout.main_template" ) />). At least it didn't trip mine.

Here's an example of a non-working and a working FB 5.5+ method that performs my login functionality and then renders the appropriate display page:

Non-Functioning method:
<cffunction name="login" returntype="void" output="false">
   <cfargument name="myFusebox" />
   <cfargument name="event" />
   [code to perform login logic here]
   <cfset myFusebox.do( action="display.dspHome",contentvariable="body" ) />
   <cfset myFusebox.do( action="layout.main_template" ) />
</cffunction>


Functioning method:
<cffunction name="login">
   <cfargument name="myFusebox" />
   <cfargument name="event" />
   [code to perform login logic here]
   <cfset myFusebox.do( action="display.dspHome",contentvariable="body" ) />
   <cfset myFusebox.do( action="layout.main_template" ) />
</cffunction>


So, even though FB 5.5+ can be used in an MVC manner, and even though many of the ways of thinking you've grown accustomed to with Model Glue do translate directly over to FB 5.5+, SOME DO NOT. Just remain mindful of this fact as you take the FB 5.5+ journey and you should be able to avoid hitting dead ends such as this one.

Doug out.



Posted by dougboude at 11:28 AM | PRINT THIS POST! |Link | 0 comments
Subscription Options

You are not logged in, so your subscription status for this entry is unknown. You can login or register here.

No comments found.

Name:   Required
Email:   Required your email address will not be publicly displayed.

Want to receive notifications when new comments are added? Login/Register for an account.

Time to take the Turing Test!!!

17 plus 19 equals
Type in the answer to the question you see above:

Your comment:

Sorry, no HTML allowed!