onRequestStart onRequest variable assignments

2014-12-29 Thread Don
This application I inherited, certain variables are not persisting their values between onRequestStart and onRequest. I've been writing to a log file to document the changes. Seems to be happening just after onRequestStart ends and onRequest begins. Values are being reset. So the variables

RE: onRequestStart onRequest variable assignments

2014-12-29 Thread David Phelan
Don, You state that certain variables are being reset so then I assume that others are maintaining their values? Is there any difference in scope between those that are maintaining their values and those that are not? Is there a conditional redirect happening in OnRequestStart? Dave

How to Determine CFC Method Called From OnRequestStart?

2009-07-11 Thread Matthew Reinbold
I'm currently trying to add logging to a webservice I've created. I'm not crazy about numerous lines of cflog inside the webservice itself; it seemed that I should be able to put a single line in the application.cfc's OnRequestStart method (not OnRequest as that won't work for remote calls

Re: How to Determine CFC Method Called From OnRequestStart?

2009-07-11 Thread James Holmes
Reinbold matthew.reinb...@voxpopdesign.com: I'm currently trying to add logging to a webservice I've created. I'm not crazy about numerous lines of cflog inside the webservice itself; it seemed that I should be able to put a single line in the application.cfc's OnRequestStart method (not OnRequest

onApplicationStart Vs onRequestStart

2008-09-28 Thread Sherif Abdou
I am new to ColdFusion and I am having trouble understanding what is the Difference between onApplicationStart method and onRequestStart method other than the Scope. For Example what does it mean by Application? First time a user comes to your site? Does it only run once? I tried to set

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread Will Tomlinson
I am new to ColdFusion and I am having trouble understanding what is the Difference between onApplicationStart method and onRequestStart method other than the Scope. For Example what does it mean by Application? First time a onapplicationstart() runs when the first cfm or cfc is executed

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread Steve Nelson
to ColdFusion and I am having trouble understanding what is the Difference between onApplicationStart method and onRequestStart method other than the Scope. For Example what does it mean by Application? First time a user comes to your site? Does it only run once? I tried to set a Variable

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread s. isaac dealey
I am new to ColdFusion and I am having trouble understanding what is the Difference between onApplicationStart method and onRequestStart method other than the Scope. For Example what does it mean by Application? First time a user comes to your site? Does it only run once? I tried to set

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread Sherif Abdou
http://VadexFX.com http://Sherifabdou.com - Original Message - From: s. isaac dealey [EMAIL PROTECTED] To: cf-talk cf-talk@houseoffusion.com Sent: Sunday, September 28, 2008 8:42 PM Subject: Re: onApplicationStart Vs onRequestStart I am new to ColdFusion and I am having trouble

Re: onApplicationStart Vs onRequestStart

2008-09-28 Thread James Holmes
The whole point of putting variables into the application scope is to cache them so you don't have to set them on every request. The reason your variables didn't get set after you added new ones was that your application had already started; OnApplicationStart doesn't run on every request.

Re: setting page variables in onRequestStart

2008-05-23 Thread Raymond Camden
Err, how is it a 'pseudo-scope? The request scope is a real scope (don't give it any confidence issues!) just as much as Variables. And I'll repeat my earlier assertion - that maybe seeing Request.Foo will help it stand out compared to Variables.goo. On Thu, May 22, 2008 at 8:21 PM, Dominic

Re: setting page variables in onRequestStart

2008-05-23 Thread Adrian Moreno
During our site rewrite, we opted to use the request scope over the variables scope for all view (CFM) pages. We use onRequestStart() to make sure certain global site variables are available in the request scope. After reading this article: http://www.schierberl.com/cfblog/index.cfm/2006/10/16

RE: setting page variables in onRequestStart

2008-05-23 Thread Dawson, Michael
Moreno [mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2008 10:23 AM To: CF-Talk Subject: Re: setting page variables in onRequestStart During our site rewrite, we opted to use the request scope over the variables scope for all view (CFM) pages. We use onRequestStart() to make sure certain global

RE: setting page variables in onRequestStart

2008-05-23 Thread Dave Watts
In other words, do you use the variables scope at all on the view pages? Would you have used: cfquery name=request.myQuery ... ? If it's really a view page, in an MVC pattern, you wouldn't have any CFQUERY tags in it. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf

RE: setting page variables in onRequestStart

2008-05-23 Thread Dawson, Michael
Of course, but that was just an example. m!ke -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Friday, May 23, 2008 1:44 PM To: CF-Talk Subject: RE: setting page variables in onRequestStart In other words, do you use the variables scope at all on the view pages

RE: setting page variables in onRequestStart

2008-05-23 Thread Dave Watts
In other words, do you use the variables scope at all on the view pages? Would you have used: cfquery name=request.myQuery ... ? If it's really a view page, in an MVC pattern, you wouldn't have any CFQUERY tags in it. Of course, but that was just an example. Yeah,

RE: setting page variables in onRequestStart

2008-05-23 Thread Dave Watts
During our site rewrite, we opted to use the request scope over the variables scope for all view (CFM) pages. We use onRequestStart() to make sure certain global site variables are available in the request scope. After reading this article: http://www.schierberl.com/cfblog/index.cfm

Re: setting page variables in onRequestStart

2008-05-23 Thread Adam Haskell
[EMAIL PROTECTED] wrote: hi is it possible to set page variables in the onRequestStart method of the application.cfc? if i enter the following code in the application.cfc: cfset variables.myVariable = myVariable and the following code in my page: cfoutput#myVariable#/cfoutput

Re: setting page variables in onRequestStart

2008-05-23 Thread Dominic Watson
Err, how is it a 'pseudo-scope? The request scope is a real scope (don't give it any confidence issues!) just as much as Variables. And I'll repeat my earlier assertion - that maybe seeing Request.Foo will help it stand out compared to Variables.goo. ;) You mis-read me (and I express

Re: setting page variables in onRequestStart

2008-05-23 Thread Dominic Watson
My only problem with Request scope is that its available _everywhere_. I understand you can be a good developer and not use it in your model or elsewhere but I still dislike the request scope for that reason. Being a person that is constantly working on framework and components to be used in

setting page variables in onRequestStart

2008-05-22 Thread Richard White
hi is it possible to set page variables in the onRequestStart method of the application.cfc? if i enter the following code in the application.cfc: cfset variables.myVariable = myVariable and the following code in my page: cfoutput#myVariable#/cfoutput i get an error message when running

Re: setting page variables in onRequestStart

2008-05-22 Thread Raymond Camden
page variables in the onRequestStart method of the application.cfc? if i enter the following code in the application.cfc: cfset variables.myVariable = myVariable and the following code in my page: cfoutput#myVariable#/cfoutput i get an error message when running a page saying myVariable

Re: setting page variables in onRequestStart

2008-05-22 Thread Richard White
thanks Raymond i haven't yet looked into the request scope but will do now! thanks again Right, you can't do that. The variables scope in App.cfc isn't copied to the template. Unless you use onRequest. But that has some drawbacks as well. Why not simply simply use the Request scope? On Thu,

Re: setting page variables in onRequestStart

2008-05-22 Thread Dominic Watson
Why not simply simply use the Request scope? Verbosity. The idea he is working on is doing something similar to the way MG3 creates the 'helper scope' for udfs. I think helpers.myUdf() is preferable to request.helpers.myUdf() though its all good. Clearly with MG, the helper/event/viewstate

Re: setting page variables in onRequestStart

2008-05-22 Thread Raymond Camden
I'd argue that variables he is setting on - every- page request should be segregated for normal page variables. If I see request.siteURL for example, it flags it as a variable that is always available, as opposed to just 'X' for example. On Thu, May 22, 2008 at 5:15 PM, Dominic Watson [EMAIL

Re: setting page variables in onRequestStart

2008-05-22 Thread Dominic Watson
I'd argue that variables he is setting on - every- page request should be segregated for normal page variables. If I see request.siteURL for example, it flags it as a variable that is always available, as opposed to just 'X' for example. Sure, I'd be with you usually; but this is an entire

Re: setting page variables in onRequestStart

2008-05-22 Thread Brian Kotek
variables.viewState? On Thu, May 22, 2008 at 9:21 PM, Dominic Watson [EMAIL PROTECTED] wrote: I'd argue that variables he is setting on - every- page request should be segregated for normal page variables. If I see request.siteURL for example, it flags it as a variable that is always

Re: setting page variables in onRequestStart

2008-05-22 Thread Dominic Watson
variables.viewState? Ok Mr Pedant, pick up on the useless bit of the post damn you :p -- Blog it up: http://fusion.dominicwatson.co.uk ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date

onRequestStart()

2008-03-20 Thread Scott Stewart
Hey all, I’m trying to include some code to check for the existence of a session.variable (session.loggedin) Is this something that should be dropped into onRequestStart() in the Application.cfc? Here’s the code cffunction name=onRequestStart cfif IsDefined(session.loggedIn

Re: onRequestStart()

2008-03-20 Thread Greg Morphis
Here's an snippet of my onRequestStart, yeah you can check for session variables in there.. cfif structkeyexists(session.user,emplid) and structkeyexists(url,group_id) cfset qGroups = application.userGateway.getGroupsForUser(emplid = session.user.emplid

Re: onRequestStart()

2008-03-20 Thread Tom McNeer
As Greg says, yes, you can certainly check for the variables in onRequestStart(). In onSessionStart() (which will fire before onRequestStart), do something like: cfset session.loggedIn = false / Then the variable should always exist (although it would still be good practice to test for its

RE: onRequestStart()

2008-03-20 Thread Scott Stewart
Thanks all -- Scott Stewart ColdFusion Developer SSTWebworks 4405 Oakshyre Way Raleigh, NC. 27616 (919) 874-6229 (home) (703) 220-2835 (cell) -Original Message- From: Tom McNeer [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2008 1:17 PM To: CF-Talk Subject: Re: onRequestStart

Setting session param in onRequestStart

2007-08-08 Thread Josh Nathanson
structKeyExists(session,mvar) anywhere the variable is used, or c) place the cfparam name=session.myvar in onRequestStart. I chose c) as it is the most DRY (Don't Repeat Yourself) to implement, but I'm wondering if it is bad practice to param a session variable in onRequestStart, or if other folks have

onRequestStart

2006-10-18 Thread Brian Peddle
In my onRequestStart a variable is set for request.user some processing is done and it never really needs to be updated again. Im trying to do cfif isdefined(request.user) to see if it has been set in the onrequeststart but it is never defined. As I write this I am guessing the request

RE: onRequestStart

2006-10-18 Thread Ben Nadel
ColdFusion Developer www.bennadel.com -Original Message- From: Brian Peddle [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 18, 2006 11:37 AM To: CF-Talk Subject: onRequestStart In my onRequestStart a variable is set for request.user some processing is done and it never really needs

RE: onRequestStart

2006-10-18 Thread loathe
: onRequestStart In my onRequestStart a variable is set for request.user some processing is done and it never really needs to be updated again. Im trying to do cfif isdefined(request.user) to see if it has been set in the onrequeststart but it is never defined. As I write this I am guessing

Re: onRequestStart

2006-10-18 Thread Teddy Payne
How often does the variable need to be updated? OnRequestStart will execute prior to every page request. If it less frequent than that, I would recommend putting it in the application start. You can use onRequestStart to check to see if the variable needs to be updated in the application scope

RE: cfthrow from onRequestStart / flashagteway

2006-06-27 Thread Andrew Stevens
Thanks for that. I had hoped I could throw the exception back to Flash like it can be done from methods in other components :( I'm trying to make use of onError but I'm not sure it fits. How does this sound: I implemented onError, which now fires when I cfthrow from inside onRequestStart

cfthrow from onRequestStart / flashagteway

2006-06-26 Thread Andrew Stevens
Hi would anyone know why I can’t use CFTHROW from within Application CFC onRequestStart()? I am calling a CFC from Flash via the flashgateway. If I cfthrow I get “06/26 23:07:37 Error [jrpp-3] - Event Handler Exception.” in Coldfusion. I’m stumped. Thanks. -- No virus

Re: cfthrow from onRequestStart / flashagteway

2006-06-26 Thread Michael Dinowitz
within the application.cfc than use a CFThrow. Hi would anyone know why I can’t use CFTHROW from within Application CFC onRequestStart()? I am calling a CFC from Flash via the flashgateway. If I cfthrow I get “06/26 23:07:37 Error [jrpp-3] - Event Handler Exception.” in Coldfusion. I’m

Re: onRequestStart problem with url variables

2006-03-07 Thread Raymond Camden
What do your image source look like? Like this? img src=dance-pcitures/2005-Bline.jpg If so, you just need to change it to: img src=/dance-pcitures/2005-Bline.jpg On 3/7/06, Les Mizzell [EMAIL PROTECTED] wrote: Head scratcher... Ok, doing this: cffunction name=onRequestStart returnType

onRequestStart problem with url variables

2006-03-06 Thread Les Mizzell
Head scratcher... Ok, doing this: cffunction name=onRequestStart returnType=boolean output=true !--- Display our Site Header at top of every page --- cfinclude template=SiteHeader.cfm cfreturn true /cffunction If I have a link with variable like images.cfm?year=2005 This works exactly

Re: onRequestStart problem with url variables

2006-03-06 Thread Les Mizzell
cffunction name=onRequestStart returnType=boolean output=true !--- Display our Site Header at top of every page --- cfinclude template=SiteHeader.cfm cfreturn true /cffunction images.cfm/year/2005 OK, I understand what it's doing - the onRequestStart is reading the images.cfm

Re: onRequestStart question.....

2006-03-02 Thread Cutter (CF-Talk)
(cgi.path_translated),,) eq 0 cfinclude template=myHeaderFile.cfm /cfif Cutter Tony wrote: might be dumb, but this is what i would do. cffunction name=onRequestStart returnType=boolean output=true cfif NOT (cgi.script_name contains yourFilename1 or cgi.script_name contains

onRequestStart question.....

2006-03-01 Thread Les Mizzell
I'm using the below to call the header for all the main pages in a site: cffunction name=onRequestStart returnType=boolean output=true !--- Display our Site Header at top of every page --- cfinclude template=SiteHeader.cfm cfreturn true /cffunction Suddenly, I find I've got maybe one

Re: onRequestStart question.....

2006-03-01 Thread Tony
might be dumb, but this is what i would do. cffunction name=onRequestStart returnType=boolean output=true cfif NOT (cgi.script_name contains yourFilename1 or cgi.script_name contains yourFileName1) !--- Display our Site Header at top of every page --- cfinclude template

RE: cfinclude from a template, or onRequestStart?

2005-11-09 Thread dave
. From: Matthew Walker [EMAIL PROTECTED] Sent: Tuesday, November 08, 2005 9:12 PM To: CF-Talk cf-talk@houseoffusion.com Subject: RE: cfinclude from a template, or onRequestStart? Personally, I wouldn't put any display elements in application.cfc but rather use it for app setup purposes

RE: cfinclude from a template, or onRequestStart?

2005-11-09 Thread Matthew Walker
. -Original Message- From: dave [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 November 2005 11:47 p.m. To: CF-Talk Subject: RE: cfinclude from a template, or onRequestStart? He's not saying to but the actual html in the app.cfc file he's saying put the include. And I don't see why you couldn't

RE: cfinclude from a template, or onRequestStart?

2005-11-09 Thread dave
Subject: RE: cfinclude from a template, or onRequestStart? I don't see why you couldn't or wouldn't Well you certainly could, although I wouldn't. It is the kind of thing that may not be a problem now but could be a hassle later. As you describe in your first paragraph below, it's a hassle when

cfinclude from a template, or onRequestStart?

2005-11-08 Thread Will Tomlinson
I usually assemble my pages with a cfinclude header, menu, footer, etc. But I figured it might be better to include the header.cfm in onRequestStart, and footer.cfm in onRequestEnd to keep from spreading includes all over the place. This way they'd all be in one spot. Am I thinking right

Re: cfinclude from a template, or onRequestStart?

2005-11-08 Thread Robert Munn
the fbx_switch file with stuff that doesn't belong there. I usually assemble my pages with a cfinclude header, menu, footer, etc. But I figured it might be better to include the header.cfm in onRequestStart, and footer.cfm in onRequestEnd to keep from spreading includes all over the place

RE: cfinclude from a template, or onRequestStart?

2005-11-08 Thread Matthew Walker
PROTECTED] Sent: Wednesday, 9 November 2005 2:46 p.m. To: CF-Talk Subject: cfinclude from a template, or onRequestStart? I usually assemble my pages with a cfinclude header, menu, footer, etc. But I figured it might be better to include the header.cfm in onRequestStart, and footer.cfm

Re: cfinclude from a template, or onRequestStart?

2005-11-08 Thread Will Tomlinson
Good points guys! Thanks! Will ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free

Re: cfinclude from a template, or onRequestStart?

2005-11-08 Thread Sean Corfield
On 11/8/05, Will Tomlinson [EMAIL PROTECTED] wrote: I usually assemble my pages with a cfinclude header, menu, footer, etc. But I figured it might be better to include the header.cfm in onRequestStart, and footer.cfm in onRequestEnd to keep from spreading includes all over the place