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
my company I cherish encapsulation and request scope spits in the face of
that. Sure Application and Session do too but they server a good purpose for
carrying state so I like them :)  I do like your point about global
variables for the life of the request and being easy to differentiate
between those and page variables. I am with Dave though maybe Application or
Session would be a better place for that info? Just my 2 cents.

Also check out what Sean did with Application.cfc in fusebox very clever to
get around most of the limitations/issues with onRequest.

Adam Haskell


On Thu, May 22, 2008 at 4:17 PM, Raymond Camden <[EMAIL PROTECTED]> wrote:

> 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, 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:
> >
> > <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 is not
> defined
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305989
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to