|
Hi Kay,
Well, the example I gave is a decent but simplified real
world example (apart from the yeehaa bit). Say a user has entered data for
a new "person" in a form, and submitted the form. You need to validate the
data before you enter it into your database. You have a substantial
validation routine coded as a fuseaction "person.validate".
In the example given, you RunAction("person.validate") to
check that the data is valid and return a flag (isValid). Then you use the
value of the isValid flag to decide if you will insert the data into the
database, using tha act_insertperson fuse.
A more complete example might be:
<cfcase value="handlenewpersondata">
<cfset RunAction("person.validate")> <cfif isValid> <cfinclude template="act_insertperson"> <cflocation
URL="index.cfm?fuseaction=thankyou">
<cfelse> <cflocation
URL="index.cfm?fuseaction=baddata">
</cfif> </cfcase> That's all. It's exactly the same thing, no more and no less, that you could do using a <cfmodule> call to run the person.validate fuseaction, except you then have to pass the data around explicitly, you incur significant performance overhead, and you have to do some work to ensure that you don't get multiple layouts, etc. Anyway, it's inspired by JohnQ and Patrick's seperate
work, with some Baltic help in figuring out the solution. I thank them
all.
Bye now,
LeeBB
----- Original Message -----
==^================================================================ This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9 Or send an email to: [EMAIL PROTECTED] T O P I C A -- Register now to manage your mail! http://www.topica.com/partner/tag02/register ==^================================================================ |
Title: Message
- Like FuseQ, but with immediate execution - alpha testers... BORKMAN Lee
- RE: Like FuseQ, but with immediate execution - alph... Kay Smoljak
- Re: Like FuseQ, but with immediate execution - ... Lee Borkman
- Re: Like FuseQ, but with immediate executio... David Huyck
- Re: Like FuseQ, but with immediate executio... Erki Esken
- Re: Like FuseQ, but with immediate exec... David Huyck
- Re: Like FuseQ, but with immediate... Erki Esken
- Re: Like FuseQ, but with immed... Lee Borkman
- Re: Like FuseQ, but with i... Erki Esken
- Re: Like FuseQ, but with i... Patrick McElhaney
- Re: Like FuseQ, but with i... Erki Esken
- RE: Like FuseQ, but with immediate execution - ... hal helms
- RE: Like FuseQ, but with immediate executio... Patrick McElhaney
