Hi Marc,
Yes, a CFLOCATION initiates a NEW request, so request-scope variables will not carry through. There are any number of ways to pass variables around if you need to: URL, CLient Vars, etc. I normally opt for the URL. Just append the parameters onto the URL in your CFLOCATION.
Best of luck, Lee.
-----Original Message----- From: Marc Ready [mailto:mready@pchelpltd.com] Sent: Tuesday, 1 May 2001 9:24 To: Fusebox Subject: Newbie --Request Scope and CFLocation question
Hello anybody,
I have been creating my first fusebox application and I am a little unclear on the request scope as it relates to cflocation. After a cflocation a request scope set in an action template is no longer available.
Example
<CFCASE VALUE="AddUpdateCarrier">
// used to update the database and to run a select query to get // the Company Name so I can pass it the Add User Form for // display. I tried using <CFSET Request.sCompanyName = #qryGetCompany.sCompanyName#> // in this template. <CFINCLUDE TEMPLATE="act_AddCopmpany.cfm">
// the request scope variable shows up here <CFOUTPUT>#Request.sCompanyName#</CFOUTPUT>
// this template uses a CFLocation to so the user // can't reload/repost the previous form and calls the // fuseaction below "AddUpdateUser" <CFINCLUDE TEMPLATE="url_AddUser.cfm">
</CFCASE>
<CFCASE VALUE="AddUpdateUser">
// <CFOUTPUT>#Request.sCompanyName#</CFOUTPUT> // will not be available to this template
<CFINCLUDE Template=dsp_AddUpdateUser.cfm>
</CFCASE>
Setting as Client scope works fine but not the Request scope.
Is there something I'm missing? I am developing on 4.01 and the Request scope works for all the variables set in app_server etc.
Also, is there any decent documentation anywhere on the request scope?
Best!
Marc Ready ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/fusebox@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists