I use would use an err_SaveNews.cfm to perform validation.
-----Original Message-----
From: Daniel Lancelot [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 13, 2000 10:28 AM
To: Fusebox
Subject: <cf_reuseform> (Fusebox Newbie)
Hi!
I am trying to write a (dummy) news circuit as a Fusebox learning exercise
(my company wants me to trial fusebox and report my findings...)
I cuurently have the following index.cfm:
<cfinclude template="../app_globals.cfm">
<cfinclude template="../applocals.cfm">
<cfparam name="attributes.fuseaction" default="DisplayNewsList">
<cfswitch expression="#attributes.fuseaction#">
<cfcase value="DisplayNewsList">
<cfinclude template="qry_GetNewsList.cfm">
<cfinclude template="dsp_NewsList.cfm">
</cfcase>
<cfcase value="AddNews">
<cfinclude template="dsp_NewsForm.cfm">
</cfcase>
<cfcase value="DisplayNews">
<cfinclude template="qry_GetNewsArticle.cfm">
<cfinclude template="dsp_NewsArticle.cfm">
</cfcase>
<cfcase value="EditNews">
<cfinclude template="qry_GetNewsArticle.cfm">
<cfinclude template="dsp_NewsForm.cfm">
</cfcase>
<cfcase value="SaveNews">
<cfmodule template="act_SaveNews.cfm">
<cfinclude template="url_ShowConfirmation">
</cfcase>
<cfcase value="ShowConfirmation">
<cfinclude template="dsp_ShowConfirmation.cfm">
</cfcase>
<cfdefaultcase>
<cfinclude template="qry_GetNewsList.cfm">
<cfinclude template="dsp_NewsList.cfm">
</cfdefaultcase>
</cfswitch>
For best reusability of my form (dsp_newsform.cfm) I am wanting to use
<cf_reuseform> to add or edit newsitems.
Am I correct in thinking that form validation should go in act_SaveNews.cfm,
and if the form submission is not valid dsp_ShowConfirmation.cfm should
relocate back to fuseaction AddNews / EditNews? (depending on whether add or
edit...)
Sorry if this seems a rather simple question - this is my first day working
with fusebox, and I wnat to get the concepts clear in my head right from the
start...
Thanks
Dan.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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