Heck... <hand in air> I'm guity of dumping sessions down like Neil. Makes sense to me... eliminates a lot of issues.
Dawesi -----Original Message----- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Wednesday, 5 November 2003 8:51 PM To: '[EMAIL PROTECTED]' Subject: RE: [ cf-dev ] Request scope I only use it when I cant be arsed locking my session vars.......i.e. at the top of the page I copy the session scope into the request scope so I can then edit etc without locks etc...then when the page has finished I whack the request back into the session scope... It basically a lazy way around of not typing cflock..... Though as you all know, in MX locking doesn't really come into play. -----Original Message----- From: Damian Watson [mailto:[EMAIL PROTECTED] Sent: 05 November 2003 09:51 To: [EMAIL PROTECTED] Subject: Re: [ cf-dev ] Request scope This has posted a couple of times recently... can say when and why you would use this? Cheers d ----- Original Message ----- From: "Robertson-Ravo, Neil (RX)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, November 05, 2003 9:35 AM Subject: RE: [ cf-dev ] Request scope > Not sure what your question is..but then again I have had hardly any sleep > ;-) but if it's a way of copying back and forth between the request and > session scope..this should work (and there are even easier ways!) > > <cfparam name="attributes.action" default="session2request"><!--- required > ---> > > <cfswitch expression="#attributes.action#"> > <!--- add session variables to the request scope ---> > <cfcase value="session2request"> > <cflock scope="SESSION" type="READONLY" timeout="15"> > <cfloop collection="#session#" item="key"> > <cfset request[key] = session[key]> > </cfloop> > </cflock></cfcase> > > <!--- add request variables to the session scope ---> > <cfcase value="request2session"> > <!--- remove request variables that should not be added to > the Session scope ---> > <cfset excludeList = "hideScript,hideTimeScript"> > <cfloop list="#excludeList#" index="i"> > <cfset StructDelete(request, i)> > </cfloop> > > <cfloop collection="#request#" item="key"> > <cflock scope="SESSION" type="EXCLUSIVE" > timeout="15"> > <cfset session[key] = request[key]> > </cflock> > </cfloop></cfcase> > > <cfdefaultcase> > The "action" ATTRIBUTE you have passed in is invalid. > <cfabort></cfdefaultcase> > </cfswitch> > > > > > > > -----Original Message----- > From: Matt Horn [mailto:[EMAIL PROTECTED] > Sent: 05 November 2003 09:35 > To: [EMAIL PROTECTED] > Subject: [ cf-dev ] Request scope > > Hi > > for as long as I have been writing Cold fusion code I have done this: > <cflock scope="session" timeout="10"> > <cfset request.userId= session.userId> > <cfset request.productionhouseId = session.productionhouseId> </cflock> > but everything works fine without the request scope > > <cflock scope="session" timeout="10"> > <cfset userId= session.userId> > <cfset productionhouseId = session.productionhouseId> </cflock> > > > so my question is this > > Am I correct in setting session variables down to Request scope > > or will the other way work just as well? > and if so .. why even have a request scope? > > Matt *Newbie > > > > |\--------------------/| > Matt Horn > Web Applications Developer > Ph:+2782 424 3751 > W: http://www.matt-horn.org > E:[EMAIL PROTECTED] > |\--------------------/| > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] > > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
