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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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,
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
[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
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
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
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
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
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,
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
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
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
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
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
Hey all,
Im 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?
Heres the code
cffunction name=onRequestStart
cfif IsDefined(session.loggedIn
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
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
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
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
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
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
: 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
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
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
Hi would anyone know why I cant 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.
Im stumped.
Thanks.
--
No virus
within the
application.cfc than use a CFThrow.
Hi would anyone know why I cant 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.
Im
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
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
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
(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
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
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
.
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
.
-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
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
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
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
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
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
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
54 matches
Mail list logo