RE: How to use Request scope?!
Sure, as long as you set it before you call it of course -Original Message- From: Ian Sheridan [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 12:38 PM To: CF-Talk Subject: How to use Request scope?! can you set a request scope variable in an include? ex. -index.cfm --include1.cfm -- set request.test --include2.cfm -- read request.test can this be done? -- -- Ian Sheridan http://www.savagevines.com ~| This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.houseoffusion.com/banners/view.cfm?bannerid=11 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183279 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
well that's the thing I am setting it in include not the index.cfm file. so I created it in the index.cfm file NOT the included file and it now works. Ian On Wed, 3 Nov 2004 12:41:26 -0500, Ewok [EMAIL PROTECTED] wrote: Sure, as long as you set it before you call it of course -Original Message- From: Ian Sheridan [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 12:38 PM To: CF-Talk Subject: How to use Request scope?! can you set a request scope variable in an include? ex. -index.cfm --include1.cfm -- set request.test --include2.cfm -- read request.test can this be done? -- -- Ian Sheridan http://www.savagevines.com ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=36 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183285 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
It sounds like it wasn't always being set in the first include. Regardless of what file a request variable is set in, it is available to all subsequent code. I may be off a bit with regard to CFCs, but that's how I understand it. --Ben Ian Sheridan wrote: well that's the thing I am setting it in include not the index.cfm file. so I created it in the index.cfm file NOT the included file and it now works. Ian Sure, as long as you set it before you call it of course -Original Message- can you set a request scope variable in an include? ex. -index.cfm --include1.cfm -- set request.test --include2.cfm -- read request.test can this be done? ~| This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.houseoffusion.com/banners/view.cfm?bannerid=11 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183286 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
Well let me be a little bit more descriptive. I have an index.cfm page that includes two files. I was then setting the REQUEST variable *in* the first include. In the second include I would then look for it. This did not work. I now set the REQUEST variable in the index.cfm file first. Then set it in the first include and read it in the second include. This works. So I gather from this experience that request is *inherited* from the parent document. Application.cfm - index.cfm -- include.cfm It only gets inherited. there is no creating it in a child include/file. Ian On Wed, 03 Nov 2004 13:05:25 -0500, Ben Doom [EMAIL PROTECTED] wrote: It sounds like it wasn't always being set in the first include. Regardless of what file a request variable is set in, it is available to all subsequent code. I may be off a bit with regard to CFCs, but that's how I understand it. --Ben Ian Sheridan wrote: well that's the thing I am setting it in include not the index.cfm file. so I created it in the index.cfm file NOT the included file and it now works. Ian Sure, as long as you set it before you call it of course -Original Message- can you set a request scope variable in an include? ex. -index.cfm --include1.cfm -- set request.test --include2.cfm -- read request.test can this be done? ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=38 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183289 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
Except that I do exactly what you said didn't work all the time. I routinely create request or variable scoped vars in one include to be used in another. The includes are serial, not nested. So I don't know what your original problem was, but I'd be careful to check and make sure that the value being used in the second include is actually what's being set in the first, not in the index. --Ben Ian Sheridan wrote: Well let me be a little bit more descriptive. I have an index.cfm page that includes two files. I was then setting the REQUEST variable *in* the first include. In the second include I would then look for it. This did not work. I now set the REQUEST variable in the index.cfm file first. Then set it in the first include and read it in the second include. This works. So I gather from this experience that request is *inherited* from the parent document. Application.cfm - index.cfm -- include.cfm It only gets inherited. there is no creating it in a child include/file. Ian ~| Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta http://www.houseoffusion.com/banners/view.cfm?bannerid=40 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183292 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
A request scope can be set anywere and is available anywhere during a request. However its bad coding practice to use it in CFCs and what not but as far as I can tell it can be done. Adam On Wed, 03 Nov 2004 13:25:35 -0500, Ben Doom [EMAIL PROTECTED] wrote: Except that I do exactly what you said didn't work all the time. I routinely create request or variable scoped vars in one include to be used in another. The includes are serial, not nested. So I don't know what your original problem was, but I'd be careful to check and make sure that the value being used in the second include is actually what's being set in the first, not in the index. --Ben Ian Sheridan wrote: Well let me be a little bit more descriptive. I have an index.cfm page that includes two files. I was then setting the REQUEST variable *in* the first include. In the second include I would then look for it. This did not work. I now set the REQUEST variable in the index.cfm file first. Then set it in the first include and read it in the second include. This works. So I gather from this experience that request is *inherited* from the parent document. Application.cfm - index.cfm -- include.cfm It only gets inherited. there is no creating it in a child include/file. Ian ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=35 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183293 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
Oh it is passing the right info but maybe it's because I am doing this on a 6.0 machine Ian On Wed, 03 Nov 2004 13:25:35 -0500, Ben Doom [EMAIL PROTECTED] wrote: Except that I do exactly what you said didn't work all the time. I routinely create request or variable scoped vars in one include to be used in another. The includes are serial, not nested. So I don't know what your original problem was, but I'd be careful to check and make sure that the value being used in the second include is actually what's being set in the first, not in the index. --Ben Ian Sheridan wrote: Well let me be a little bit more descriptive. I have an index.cfm page that includes two files. I was then setting the REQUEST variable *in* the first include. In the second include I would then look for it. This did not work. I now set the REQUEST variable in the index.cfm file first. Then set it in the first include and read it in the second include. This works. So I gather from this experience that request is *inherited* from the parent document. Application.cfm - index.cfm -- include.cfm It only gets inherited. there is no creating it in a child include/file. Ian ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=38 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183294 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: How to use Request scope?!
Same here... I set all my request variables in one file then include it via Application.cfm. the request vars are available anywhere and everywhere throughout the entire application this way. If you have these two files... !--- Request.cfm--- cfset request.testvar = request variable !--- index.cfm --- cfinclude template=request.cfm cfoutput#request.testvar#/cfoutput Index.cfm should just display request variable This SHOULD definitely work. If it's not, then there is something wrong somewhere else. Were you getting test not defined in request scope errors? Or any kind of error for that matter... -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 1:26 PM To: CF-Talk Subject: Re: How to use Request scope?! Except that I do exactly what you said didn't work all the time. I routinely create request or variable scoped vars in one include to be used in another. The includes are serial, not nested. So I don't know what your original problem was, but I'd be careful to check and make sure that the value being used in the second include is actually what's being set in the first, not in the index. --Ben Ian Sheridan wrote: Well let me be a little bit more descriptive. I have an index.cfm page that includes two files. I was then setting the REQUEST variable *in* the first include. In the second include I would then look for it. This did not work. I now set the REQUEST variable in the index.cfm file first. Then set it in the first include and read it in the second include. This works. So I gather from this experience that request is *inherited* from the parent document. Application.cfm - index.cfm -- include.cfm It only gets inherited. there is no creating it in a child include/file. Ian ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=37 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183301 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
It shouldn't matter what version. Request variables worked the way documented in 5, I know from experience. They should work in 6.0 just fine. But that raises the question of why you're running 6.0 instead of 6.1 with updaters. Is there are reason? If not, you should definately update -- there are a number of security and performance fixes. --Ben Ian Sheridan wrote: Oh it is passing the right info but maybe it's because I am doing this on a 6.0 machine Ian On Wed, 03 Nov 2004 13:25:35 -0500, Ben Doom [EMAIL PROTECTED] wrote: Except that I do exactly what you said didn't work all the time. I routinely create request or variable scoped vars in one include to be used in another. The includes are serial, not nested. So I don't know what your original problem was, but I'd be careful to check and make sure that the value being used in the second include is actually what's being set in the first, not in the index. --Ben ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=34 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183303 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
I was getting the actionpasser not defined in the Request scope. This is basicly what I am doing: !--- include1.cfm --- cfset request.actionpasser = o.param !--- include2.cfm --- cfoutput#request.actionpasser#/cfoutput !--- index.cfm --- cfinclude template=include1.cfm cfinclude template=include2.cfm On Wed, 3 Nov 2004 14:08:51 -0500, Ewok [EMAIL PROTECTED] wrote: Same here... I set all my request variables in one file then include it via Application.cfm. the request vars are available anywhere and everywhere throughout the entire application this way. If you have these two files... !--- Request.cfm--- cfset request.testvar = request variable !--- index.cfm --- cfinclude template=request.cfm cfoutput#request.testvar#/cfoutput Index.cfm should just display request variable This SHOULD definitely work. If it's not, then there is something wrong somewhere else. Were you getting test not defined in request scope errors? Or any kind of error for that matter... -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 1:26 PM To: CF-Talk Subject: Re: How to use Request scope?! Except that I do exactly what you said didn't work all the time. I routinely create request or variable scoped vars in one include to be used in another. The includes are serial, not nested. So I don't know what your original problem was, but I'd be careful to check and make sure that the value being used in the second include is actually what's being set in the first, not in the index. --Ben Ian Sheridan wrote: Well let me be a little bit more descriptive. I have an index.cfm page that includes two files. I was then setting the REQUEST variable *in* the first include. In the second include I would then look for it. This did not work. I now set the REQUEST variable in the index.cfm file first. Then set it in the first include and read it in the second include. This works. So I gather from this experience that request is *inherited* from the parent document. Application.cfm - index.cfm -- include.cfm It only gets inherited. there is no creating it in a child include/file. Ian ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=35 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183306 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: How to use Request scope?!
ThatÂ’s pretty strange. I've never seen or heard of it happening before. Everything seems right to me. What happens when you unscope it? Make it just actionpasser instead of request.actionpasser. This would work just the same as it SHOULD when scoped as request. Are you having nay problems with the request scope anywhere else? -Original Message- From: Ian Sheridan [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 2:19 PM To: CF-Talk Subject: Re: How to use Request scope?! I was getting the actionpasser not defined in the Request scope. This is basicly what I am doing: !--- include1.cfm --- cfset request.actionpasser = o.param !--- include2.cfm --- cfoutput#request.actionpasser#/cfoutput !--- index.cfm --- cfinclude template=include1.cfm cfinclude template=include2.cfm On Wed, 3 Nov 2004 14:08:51 -0500, Ewok [EMAIL PROTECTED] wrote: Same here... I set all my request variables in one file then include it via Application.cfm. the request vars are available anywhere and everywhere throughout the entire application this way. If you have these two files... !--- Request.cfm--- cfset request.testvar = request variable !--- index.cfm --- cfinclude template=request.cfm cfoutput#request.testvar#/cfoutput Index.cfm should just display request variable This SHOULD definitely work. If it's not, then there is something wrong somewhere else. Were you getting test not defined in request scope errors? Or any kind of error for that matter... -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 1:26 PM To: CF-Talk Subject: Re: How to use Request scope?! Except that I do exactly what you said didn't work all the time. I routinely create request or variable scoped vars in one include to be used in another. The includes are serial, not nested. So I don't know what your original problem was, but I'd be careful to check and make sure that the value being used in the second include is actually what's being set in the first, not in the index. --Ben Ian Sheridan wrote: Well let me be a little bit more descriptive. I have an index.cfm page that includes two files. I was then setting the REQUEST variable *in* the first include. In the second include I would then look for it. This did not work. I now set the REQUEST variable in the index.cfm file first. Then set it in the first include and read it in the second include. This works. So I gather from this experience that request is *inherited* from the parent document. Application.cfm - index.cfm -- include.cfm It only gets inherited. there is no creating it in a child include/file. Ian ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=38 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183313 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
Have you checked that o.param contains a valid value? On Wed, 3 Nov 2004 14:18:49 -0500, Ian Sheridan [EMAIL PROTECTED] wrote: I was getting the actionpasser not defined in the Request scope. This is basicly what I am doing: !--- include1.cfm --- cfset request.actionpasser = o.param !--- include2.cfm --- cfoutput#request.actionpasser#/cfoutput !--- index.cfm --- cfinclude template=include1.cfm cfinclude template=include2.cfm ~| Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta http://www.houseoffusion.com/banners/view.cfm?bannerid=40 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183317 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
oh yeah it works I am getting the expected value in o.param. On Wed, 3 Nov 2004 15:15:46 -0800, Sean Corfield [EMAIL PROTECTED] wrote: Have you checked that o.param contains a valid value? On Wed, 3 Nov 2004 14:18:49 -0500, Ian Sheridan [EMAIL PROTECTED] wrote: I was getting the actionpasser not defined in the Request scope. This is basicly what I am doing: !--- include1.cfm --- cfset request.actionpasser = o.param !--- include2.cfm --- cfoutput#request.actionpasser#/cfoutput !--- index.cfm --- cfinclude template=include1.cfm cfinclude template=include2.cfm -- -- Ian Sheridan http://www.savagevines.com -- ~| This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.houseoffusion.com/banners/view.cfm?bannerid=11 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183318 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
On Wed, 3 Nov 2004 18:29:00 -0500, Ian Sheridan [EMAIL PROTECTED] wrote: oh yeah it works I am getting the expected value in o.param. Where is o.param set? You didn't show that in your cut-down code... !--- include1.cfm --- cfset request.actionpasser = o.param !--- include2.cfm --- cfoutput#request.actionpasser#/cfoutput !--- index.cfm --- cfinclude template=include1.cfm cfinclude template=include2.cfm -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Got Gmail? -- I have 1 invite If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta http://www.houseoffusion.com/banners/view.cfm?bannerid=40 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183325 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: How to use Request scope?!
Either way, it had to be set or the error he would get would be PARAM not defined in O. -Original Message- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 03, 2004 8:02 PM To: CF-Talk Subject: Re: How to use Request scope?! On Wed, 3 Nov 2004 18:29:00 -0500, Ian Sheridan [EMAIL PROTECTED] wrote: oh yeah it works I am getting the expected value in o.param. Where is o.param set? You didn't show that in your cut-down code... !--- include1.cfm --- cfset request.actionpasser = o.param !--- include2.cfm --- cfoutput#request.actionpasser#/cfoutput !--- index.cfm --- cfinclude template=include1.cfm cfinclude template=include2.cfm -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Got Gmail? -- I have 1 invite If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=34 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183326 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: How to use Request scope?!
o.param is a string that I get out of a CFPROCEDURE it's there and avaiable. I have focused it down to the setting the request variable. when I dump and abort the o.param it's there. Ian On Wed, 3 Nov 2004 17:02:11 -0800, Sean Corfield [EMAIL PROTECTED] wrote: On Wed, 3 Nov 2004 18:29:00 -0500, Ian Sheridan [EMAIL PROTECTED] wrote: oh yeah it works I am getting the expected value in o.param. Where is o.param set? You didn't show that in your cut-down code... !--- include1.cfm --- cfset request.actionpasser = o.param !--- include2.cfm --- cfoutput#request.actionpasser#/cfoutput !--- index.cfm --- cfinclude template=include1.cfm cfinclude template=include2.cfm -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Got Gmail? -- I have 1 invite If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=34 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183327 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54