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
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 vari
tthew 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 meth
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
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.
mxAjax
Abdou
http://VadexFX.com
http://Sherifabdou.com
- Original Message -
From: "s. isaac dealey" <[EMAIL PROTECTED]>
To: "cf-talk"
Sent: Sunday, September 28, 2008 8:42 PM
Subject: Re: onApplicationStart Vs onRequestStart
>> I am new to ColdFusion and I am hav
> 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
nApplicationStart 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
> in
> the onApplicationStart method like
> and I get an Error when I say u
>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 ex
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 a
> 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 i
>
> 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 b
gt;
> On Thu, May 22, 2008 at 3:10 PM, Richard White <[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:
> >
> 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:
> h
> > > In other words, do you use the variables scope at all on the "view"
> > > pages?
> > >
> > > Would you have used:
> > >
> > > ?
> >
> > 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, that wa
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 &q
> In other words, do you use the variables scope at all on the "view"
> pages?
>
> Would you have used:
>
> ?
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 Training: Adobe/Google/Pap
[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 sit
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.c
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 Watso
> 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
Ge
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 alwa
> 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
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 PROT
> 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 varia
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?
>
>O
t;
> 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:
>
>
>
> and the following code in my page:
>
> #myVariable#
>
> i get an error me
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:
and the following code in my page:
#myVariable#
i get an error message when running a page saying myVariable is not defined
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
As Greg says, yes, you can certainly check for the variables in
onRequestStart().
In onSessionStart() (which will fire before onRequestStart), do something
like:
Then the variable should always exist (although it would still be good
practice to test for its existence, as you did in your sample
Here's an snippet of my onRequestStart, yeah you can check for session
variables in
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
") anywhere the variable
is used, or c) place the 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 been in a similar
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
lk
> Subject: 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 to see if it has been set
> in the onrequeststart but it is never defined.
>
> As I
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
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 to see if it has been set
in the onrequeststart but it is never defined.
As I write this I am guessing the request variable needs to be set
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
onRequest
ethod 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
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
What do your image source look like? Like this?
If so, you just need to change it to:
On 3/7/06, Les Mizzell <[EMAIL PROTECTED]> wrote:
> Head scratcher...
>
> Ok, doing this:
>
>
>
>
>
>
>
> If I have a link with variable like
>
> images.cfm?year=2005
>
> This works exactly lik
>
>
>
>
>
>
> images.cfm/year/2005
OK, I understand what it's doing - the onRequestStart is reading the
images.cfm/year/2005 as a full link - so maybe my fix is to put my "url
decode&qu
Head scratcher...
Ok, doing this:
If I have a link with variable like
images.cfm?year=2005
This works exactly like it should. An image on the page will display
correctly and the path is correct:
dance-pictures/2005-BLine.jpg
However, to help pages get indexed I've changed all m
Maybe something like:
Cutter
Tony wrote:
> might be dumb, but this is what i would do.
>
>
> cgi.script_name contains "yourFileName1")>
>
>
>
>
>
>
>
>
>
> tw
>
>
> On 3/1/06, Les Mizzell <[EMAIL PROTECTED]> wrot
might be dumb, but this is what i would do.
tw
On 3/1/06, Les Mizzell <[EMAIL PROTECTED]> wrote:
> I'm using the below to call the header for all the main pages in a site:
>
>
>
>
>
>
>
> Suddenly, I find I've got
I'm using the below to call the header for all the main pages in a site:
Suddenly, I find I've got maybe one of two pages where I do *NOT* want
to call that specific header. Is there a good way to EXCLUDE a page from
using that header, but keep it in the same directory as all the
sday, November 09, 2005 2:33 PM
To: CF-Talk
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.
different type of content such as XML.
-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
Tuesday, November 08, 2005 9:12 PM
To: CF-Talk
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 (defining global variables,
initialising shopping carts, etc). If you wanted
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 ov
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
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 in onRequestEnd to keep from spreading
includes all
to pollute 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 spreadin
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
54 matches
Mail list logo