I haven't seen this go through the list yet so I thought I would toss it out.
When working on the backend interface of websites I have found that sometimes I need
to load several different pages in a row to get all the information I need. However, I
don't always need the same pages, depending on the item.
For example, I have a basic entry form for items in a store. This form works for all
items but doesn't include specific fields for certain items. If I am entering a CD, I
need to display a second page with track fields, if the item is customizable I need to
display a customizability form. My problem was keeping track of what forms were needed
and which ones were filled out. Enter: FuseList.
On the top of the action page after the basic form I create a list:
<CFSET Attributes.FuseList = "">
Then I use CFIF statements to see if various conditions are met to add a FuseAction.
If I said the item was customizable on the first page I do this:
<CFIF Attributes.Customizable EQ "Y">
<CFSET Attributes.FuseList = ListAppend(Attributes.FuseList, "Customize")>
</CFIF>
This way I get a list of all necessary FuseActions for the item.
After the action page runs, I check to see if Attributes.FuseList is defined and if it
has a length:
<CFIF IsDefined("Attributes.FuseList") AND Len(Attributes.FuseList)>
If so I include the following in the CFLOCATION statement:
FuseAction=#ListGetAt(Attributes.FuseList, 1)#
<CFLOCATION
URL="#request.admin.cfroot#/dataentry/index.cfm?FuseAction=#ListGetAt(Attributes.FuseList,
1)#" ADDTOKEN="no">
<CFELSE>
Otherwise I return to the main page.
<CFLOCATION URL="#request.admin.cfroot#/index.cfm?FuseAction=Main" ADDTOKEN="no">
</CFIF>
In the CFCASE clause that matches the FuseAction I put <CFSET Attributes.FuseList =
ListDeleteAt(Attributes.FuseList, 1)> to remove the matching FuseAction from the list.
Finally I pass the FuseList as a parameter into the CFMODULE tag of the next form.
What do you all think of this?
Ian
Webmaster
The Catholic Store
http://www.catholicstore.com
The Catholic Liturgical Library
http://www.catholicliturgy.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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