If you use nested fuseboxes, you'll find that one of the advantages is that
exceptions "bubble up" from the innermost circuit to the home app (and all
others in the line of inheritance). This means you can decide to trap some
errors at the local level, but have overall site exception handling for
things like customer alerts, etc. I find this to be a very flexible and easy
way to handle exceptions.

Hal Helms
== See ColdFusionTraining.com for info on "Best Practices with ColdFusion &
Fusebox" training ==


-----Original Message-----
From: Ken Beard [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 29, 2001 3:48 PM
To: Fusebox
Subject: Re: Question About Handling Error Messages to Users


The method you saw on fusebox.org is easier and better, IMHO.
often you'll be sending the form entries back to the form, and telling the
user which of them is an invalid value... so you'd have to pass all your
form vars again...
and it's easier from a usability standpoint to see "what i did wrong" on
the same page where i can select/type a valid value.


At 11:48 PM 1/26/01 -0600, you wrote:
>I'm building my first Fusebox app (yea!), but I've run into a situation and
>want to know how others handle it. It's pretty common - a query gets run
and
>if the results aren't as expected, the user needs to be presented with a
>message telling them to try again. I've done this scenario hundreds of time
>in CF but I'm still trying to wrap my mind around the FB way.
>
>For example, in my app a user selects a company's name from the default
>fuseaction page and gets sent to a page to enter a store number in a form.
>Then a SELECT query (qry_getstoreinfo.cfm) runs to see if the store they
>entered belongs to the company. If it does, another query runs to retrieve
>some info specific to that store. If the store they entered DOES NOT belong
>to the company, I need to display a message to tell them to go back and try
>again.
>
>I've read thru the code from the fusebox.org site and the only place where
I
>can see where error messages get set and displayed to the user is in the
>login app (in the Members circuit application). In that example, a
>client.message gets set in act_login.cfm and then displayed on the login
>form (dsp_loginform.cfm) when a user gets sent back to it because they
>didn't enter a correct username or password.
>
>So, if I follow this example, would it make sense to set a session.message
>(I'm using session vars vice client vars) after my query if no records
match
>and then CFLocate them back to the page where they enter the store number
>and then display the message using a CFIsdefined(session.message)? Or is
>there a better way for handling these type of messages to the user? What
>about if I had a fuseaction like "errormessage" and then a
>dsp_errormessage.cfm file to show the message and then CFLocate the user
>back to the page to re-enter their store number (I guess this page would be
>akin to the GoTo attribute in the cf_returnfuseaction tag)? Would that make
>more sense?
>
>TIA,
>
>Chris Montgomery             [EMAIL PROTECTED]
>
>Web Development & Consulting http://www.astutia.com
>Allaire Consulting Partner
>210-490-3249/888-745-7603    Fax 210-490-4692
>AIM: astutiaweb; ICQ: 7381282; Firetalk: Ag78
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to