Section 10: Target fbx_switch.cfm

This section includes the target circuit’s fbx_switch.cfm file. The fbx_switch.cfm file decides which fuses to run based on the value of fusebox.fuseaction. Here is the fbx_switch.cfm file from the reviews circuit:

<cfswitch expression = "#fusebox.fuseaction#"> 
  <cfcase value="read"> 
    <cfset xfa.addReview="#fusebox.thisCircuit#.reviewForm"> 
    <cfinclude template="qry_reviewByProduct.cfm"> 
    <cfinclude template="dsp_reviews.cfm"> 
  </cfcase> 
  <cfcase value="reviewForm"> 
    <cfset xfa.submit="#fusebox.thisCircuit#.addReview"> 
    <cfinclude template="dsp_reviewForm.cfm"> 
  </cfcase> 
  <cfcase value="addReview"> 
    <cfset xfa.continue="#fusebox.thisCircuit#.read"> 
    <cfinclude template="qry_addReview.cfm"> 
  </cfcase> 
</cfswitch> 

No more ...

Get Fusebox: Developing ColdFusion® Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.