the block of code at the top of
Application.cfc (outside of any method in Application.cfc). This means we
can't instantiate CFC's under the /cfc directory in that top script block area.
We know we can create CFC's in onApplicationStart(), but we currently use a CFC
to set the Application's
Mark,
When you say global mappings, are you saying that you created a mapping in
the ColdFusion admin? Also, can you maybe share some of your
Application.cfc code for us to get a better idea as to what you are trying
to accomplish?
On Wed, Oct 8, 2014 at 1:58 PM, Gaulin, Mark mark.gau
On Wed, Oct 8, 2014 at 1:58 PM, Gaulin, Mark mark.gau...@ihs.com wrote:
It appears that the CF mappings defined in CFIDE (such as /cfc - root
dir for all of our CFC's) are not defined inside the block of code at the
top of Application.cfc
I would also test this with a global mapping
();
}
/cfscript
/cfcomponent
-Original Message-
From: Dean Lawrence [mailto:dean...@gmail.com]
Sent: Wednesday, October 08, 2014 2:13 PM
To: cf-talk
Subject: Re: CF11 changes to Application.cfc - no mappings defined?
Mark,
When you say global mappings, are you saying
Hi Cameron
We can successfully use the /cfc mapping outside of the top script block, so I
don't think it is reserved in that way. We also observed that expandPath()
behaves differently in the top script block vs in a Application.cfc method. (It
expands the mappings paths properly
Hmm, that is odd. It may very well be a bug. I don't know for sure if the
location of where you define the application properties is restricted to
the top of your Application.cfc or not, but here are two things to try.
Placing the calling of your configuration cfc inside your
onApplicationStart
On Wed, Oct 8, 2014 at 2:42 PM, Gaulin, Mark wrote:
We can successfully use the /cfc mapping outside of the top script block,
so I don't think it is reserved in that way.
You are probably right but it may still be worth testing out, since the
very root of your problem is that something in
Subject: Re: CF11 changes to Application.cfc - no mappings defined?
Hmm, that is odd. It may very well be a bug. I don't know for sure if the
location of where you define the application properties is restricted to the
top of your Application.cfc or not, but here are two things to try.
Placing
On 4/11/2014 12:58 PM, Donnie Carvajal wrote:
Hi,
I have an application with a root application.cfc and a subfolder for IVR
access that also has an application.cfc which extends the root
application.cfc. There are certain Application variables that I only need in
the IVR subfolder, so I
Hi,
I have an application with a root application.cfc and a subfolder for IVR
access that also has an application.cfc which extends the root application.cfc.
There are certain Application variables that I only need in the IVR subfolder,
so I added an onApplicationStart method
apps together to make
them a bit more cohesive.
What is IVR an acronym for anyhow?
Byron Mann
Lead Engineer Architect
HostMySite.com
On Apr 11, 2014 12:59 PM, Donnie Carvajal donnie.carva...@transformyx.com
wrote:
Hi,
I have an application with a root application.cfc and a subfolder for IVR
does each of your application.cfc have a different application name ?
On Fri, Apr 11, 2014 at 5:58 PM, Donnie Carvajal
donnie.carva...@transformyx.com wrote:
Hi,
I have an application with a root application.cfc and a subfolder for IVR
access that also has an application.cfc which
Hi Byron,
IVR stands for Interactive Voice Response. This particular app allows users to
login via phone, so I want the same logic as the web app for logging in.
Hi Russ,
Currently, both application.cfc's have the same application name.
Donnie
does each of your application.cfc have
Hi Russ,
To be more specific, I am not setting the application name in the sub
application.cfc.
Donnie
Hi Byron,
IVR stands for Interactive Voice Response. This particular app allows
users to login via phone, so I want the same logic as the web app for
logging in.
Hi Russ
Voice Response. This particular app allows
users to login via phone, so I want the same logic as the web app for
logging in.
Hi Russ,
Currently, both application.cfc's have the same application name.
Donnie
does each of your application.cfc have a different application name ?
On Fri
On Fri, Apr 11, 2014 at 12:58 PM, Donnie Carvajal wrote:
I have an application with a root application.cfc and a subfolder for IVR
access that also has an application.cfc which extends the root
application.cfc. There are certain Application variables that I only need
in the IVR subfolder
is doing some other things too.
A few ways you could do this. Here are some ideas:
1) Use some sort of BeanFactory/Parent SubFactories to populate these
beans. DI/1 is a good one...
https://github.com/framework-one/di1
2) You could pull out some of the Application.cfc code and abstract
On Fri, Apr 11, 2014 at 3:42 PM, Donnie Carvajal wrote:
What are the pros and cons for using separate application names? Are
there any caveats I should be aware of if I decide to use separate
application names?
Separate application names result in separate applications.
There are no
Try setting it
Russ Michaels
www.michaels.me.uk
cfmldeveloper.com
cflive.net
cfsearch.com
On 11 Apr 2014 18:29, Donnie Carvajal donnie.carva...@transformyx.com
wrote:
Hi Russ,
To be more specific, I am not setting the application name in the sub
application.cfc.
Donnie
Hi Byron
Here's the background...
We have all of our requests going through the index.cfm in the root and
depending on variable values, they get directed, via cfincludes, to subfolders.
My question is how do I get the application.cfc in the subfolder to run? The
application.cfc in the root is getting
to get the application.cfc in the subfolder to run, then your original
request would have to be to the subfolder. CF bases which
application.cfc to fire upon the originating request, then travels up
the tree til it finds one (not down, as you are trying to do)
Steve 'Cutter' Blades
Adobe
I would tend to agree that you cannot do it this way because the
application.cfc fires on first request.
If you can use IIS (or Apache) to do your redirect before the application.cfc
fires you should be able to get the ones in the subfolders to fire first, then
do an include at the top
That is what I was afraid of ;-) Thanks Steve!
-Original Message-
From: Steve 'Cutter' Blades [mailto:cold.fus...@cutterscrossing.com]
Sent: Monday, November 25, 2013 12:34 PM
To: cf-talk
Subject: Re: Application.cfc question
to get the application.cfc in the subfolder to run
Short answer is, its difficult if you want to inherit the methods of the root
folder Application.cfc. Coldfusion allows for one Application.cfc to extend
another, but only if the inherited Application.cfc isnt in the root directory
of the site or has a mapping in the CF Admin ( i.e. -you
could you not have 1 application.cfc which simply calls different
methods/includes according to the path in the URL.
I have never tried it, and it would be bad practice and only a temp
solution (others will swear for my suggesting this), but perhaps a quick
fix would be to have the root
If the purpose is code reuse, another possibility might be putting all
logic into templates or other cfc. Then have both application.cfc call the
required functionality through includes or method calls. Somewhat like a
shared library.
Byron Mann
Lead Engineer Architect
HostMySite.com
On Nov 25
Well now I feel like an idiot. :) I should have caught the missing quotation
marks. And the APPLICATION.CFM is in fact a typo, the actual file I'm using is
APPLICATION.CFC, sorry 'bout that.
After replacing the quotation marks I have a new error, it is in line 5. The
verbiage of the error
You seem to be mixing Application.cfc syntax (this.applicationTimeout) and
Application.cfm syntax (cfapplication). If you're using App.cfc, and I
would suggest you do, then I would not expect the cfapplication tag to
work. I could be wrong, though, as I've never tried that. Something to
check
always assume your problem is at the exact spot
reported. Look all around it too.
Look closely.
If you are still having problems on the first few lines of the
Application.cfc file, posting each line error to CF-Talk is probably the
slowest way imaginable to debug your application. At this pace you
Thanks, Andrew, looks like it's working now, I changed the cfapplication
block to a cfscript block per your suggestion and I am now getting the login
screen, so thank you again. I'm going to tinker with it a little more and see
if I can integrate it with the rest of my code (it's a standalone
Hello all, I'm new to CF and had an excellent experience posting here with my
last issue, now I am having a problem making my secure login to my webpage
work. The issue seems to be (if I'm understanding correctly) that there is an
infinite loop between my login.cfm and application.cfc. I
cfif not IsDefined(LoggedIn) !--- this logic added to ---
This line is getting triggered on every page load, so when it
redirects and reloads the page it's getting triggered again in an
endless cycle. You'll need to add logic to tell it not to redirect
when you're actually loading the login
Okay, so I found a different stand-alone set of login pages/code on a different
website, but when I try to go to the index.cfm page (which previously worked
w/o the inclusion of the new pages/code) I get:
Invalid token c found on line 20 at column 4.
18:calling THIS page (application.cfc
Yeah you might like to do
cfif structKeyExists(session, allowin) and not session.allowin
otherwise if the variable doesn't exist in the scope, it will error.
--
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/113032480415921517411
/o the inclusion of the new pages/code) I get:
Invalid token c found on line 20 at column 4.
18:calling THIS page (application.cfc) is login.cfm and not
login_process.cfm as
19:that will cause an infinite loop of application.cfm being
called.Use this call---
20: cfif session.allowin NEQ true
21
Andrew - Tried your suggestion, no change
Al - Tried your suggestion, different error message:
Invalid CFML construct found on line 5 at column 33
5: applicationtimeout=#CreateTimeSpan(0,2,0,0)# /
Which according to my text-editor is the between the 'e' in Create and 'T' in
Timespan.
I will
Edit: Sorry Andrew, meant to attach this to the bottom of the entire thread.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
On Mon, Jan 14, 2013 at 5:25 PM, B Griffith br.griff...@yahoo.com wrote:
Invalid CFML construct found on line 5 at column 33
5: applicationtimeout=#CreateTimeSpan(0,2,0,0)# /
I don't know if it's a typo, but in the code sample you posted below you
are missing a closing quote mark ().
this line has an extra set of quotes at the end
5: applicationtimeout=#CreateTimeSpan(0,2,0,0)# /
this section has missing closing quotes on the last 2 params
!--- APPLICATION.CFM ---
cfapplication name=MyApp
clientmanagement=Yes
sessionmanagement=Yes
You have no ending double quote on the two timeout attributes:
sessiontimeout=#CreateTimeSpan(0,0,15,0)#
applicationtimeout=#CreateTimeSpan(0,2,0,0)# /
that means the parser is rolling along trying to find the other end of
the quoted section.
It should be:
Is this Application.cfm or Application.cfc
You have Application.cfm and yet you have Application.cfc code, that is a
bug problem in itself.
So if this is an Application.cfc, you need to remove the cfparams ( I am
not sure these work in Application.cfc, sure someone will correct
-ID:
CAKa5oqLv2tFXLzyc2zS=mmu=D3TzGXLE9vEprxisKiOet+S=z...@mail.gmail.com
Subject: Re: Loss of variables after switch from application.cfm to
application.cfc in FB 3 application
References: 355f13cb$34d4cb1f$54e8dc90$@com
Date: Mon, 5 Nov 2012 14:24:28 -0600
Precedence: bulk
Reply-To: cf-talk
Matt, others,
A quick follow up on this. It seems that request variables have no problem
persisting if called / set within an application.cfc. Is that right?
Nick
Return-Path: listmas...@houseoffusion.com
Received: from mail.houseoffusion.com
Depending upon where/how they're called/set, that is true. No problem at
all setting/calling request.foo within Application.cfc.
On Thu, Nov 8, 2012 at 7:55 PM, Nick Gleason n.glea...@citysoft.com wrote:
Matt, others,
A quick follow up on this. It seems that request variables have
Hi folks,
Bit of a head scratcher here which I'm hoping may be obvious to you all.
We've got a Fusebox 3 application which we have recently converted from
application.cfm to application.cfc.
One puzzling result has been that during a single page request, an
attributes variable that is set
of a head scratcher here which I'm hoping may be obvious to you all.
We've got a Fusebox 3 application which we have recently converted from
application.cfm to application.cfc.
One puzzling result has been that during a single page request, an
attributes variable that is set in a file called from
On Sun, Oct 14, 2012 at 7:27 PM, Azadi Saryev azadi.sar...@gmail.comwrote:
If it is only applicationname that you need to be unique, then you
could just use a hash of template path as app name, or some variation
of the below:
this.name = hash(getCurrenttTmplatePath());
I second this
cf-talk@houseoffusion.com
Message-ID:
cafczd6eray5dujyqz9pwcxqndfg543tqihedxuykvvvmo4e...@mail.gmail.com
Subject: Re: Best practice question for Application.cfc
References: 15d47c6$67f60c41$750c1d46$@com
Date: Tue, 16 Oct 2012 12:41:22 +0900
Precedence: bulk
Reply-To: cf-talk@houseoffusion.com
From
Hello Azadi,
Thanks for the feedback. Although I am interested in the extends attribute
of the cfc for this, that seemed a bit tricky. Since all I need in the
short run was to get the applicationname variable into application.cfc, I
did do something similar to what you suggest.
One question
I use hash() not for security, but to 'normalize' the value of
application name - to make sure it does not contain any problematic
special characters, which getCurrentTemplatePath() may return (like
'C:\\some path\some.sub.path\my folder\etc etc etc\Application.cfc').
Azadi
On Mon, Oct 15, 2012
,
We're moving from application.cfm to application.cfc and I had a question
regarding best practices.
We re-use our base code and in the past, we have used a settings page that
is external from the base code and unique per client to set the
applicationname variable (and other variables
.safesecureweb.com with SMTP;
Sat, 13 Oct 2012 14:12:49 -0400
To: cf-talk cf-talk@houseoffusion.com
Message-ID:
CAOnEp2f+=czlr6qqqsjymn6lvnqy0srlow5ts+ks8nv5+a6...@mail.gmail.com
Subject: Re: Best practice question for Application.cfc
References:
CACi=xszchjy1aa1pzuhnjw5qktbat800vd+sasfjpmvugv9
Hi Folks,
We're moving from application.cfm to application.cfc and I had a question
regarding best practices.
We re-use our base code and in the past, we have used a settings page that
is external from the base code and unique per client to set the
applicationname variable (and other variables
We're moving from application.cfm to application.cfc and I had a question
regarding best practices.
We re-use our base code and in the past, we have used a settings page that
is external from the base code and unique per client to set the
applicationname variable (and other variables
Which ever way you do it, somewhere or other you have to have a file
that's unique to this site, or have a settings record in a database or
some such. Does it REALLY make much difference if it's a site-specific
Application.cfc or a site-specific Settings.xml file or a site-specific
Settings
Hi,
I have a site I'm converting to use application.cfc rather than
application.cfm. I have a setting I use to say I'm on local (development mode)
or live. If application.setlocal eq 1 I'm in dev mode and it turns a bunch of
stuff on or off to help me with development. Works perfectly
I have the following for OnError. Live mode (application.setlocal eq 0)
works perfectly. It's the ELSE that's not working. In the else I want
it to show robust error messaging... but I'm getting a blank screen.
The onError() method is catching the error for you, so if you want
ColdFusion to
: Application.cfc OnErrorRequest
I have the following for OnError. Live mode (application.setlocal eq
0) works perfectly. It's the ELSE that's not working. In the else I
want it to show robust error messaging... but I'm getting a blank screen.
The onError() method is catching the error for you, so
Found it... In spite of Adobe's documentation which says: This method does not
return a value; do not use the cfreturn tag.
(http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=AppEvents_06.html)
Adding cfreturn false /
Now this (below) works as expected:
cffunction
/cfoutput
It seems that no matter how I try to do it, either putting js directly
into an application.cfc or either using a cfinclude in an
onRequest function, the js can't be processed along with the other
code in the application.cfc.
I'm trying to locate all variables
/cfoutput
It seems that no matter how I try to do it, either putting js directly
into an application.cfc or either using a cfinclude in an
onRequest function, the js can't be processed along with the other
code in the application.cfc.
I'm trying to locate all variables for a site in one
Hi, Michael...
No, I'm not trying to output anything to the browser, just
establish the variables, in this case the JS global variables
for use throughout the site.
I establish all the CF variables in the application.cfc and
was trying to see if I could accomplish the same thing with the
JS
It seems that no matter how I try to do it, either putting
js directly into an application.cfc or either using a cfinclude
in an onRequest function, the js can't be processed along
with the other code in the application.cfc.
A few options come to mind...
1) Wrap that output
No, I'm not trying to output anything to the browser, just
establish the variables, in this case the JS global variables
for use throughout the site.
JavaScript is executed entirely by the browser, so for the browser to
get those variables you will need to include them in the HTML output
Thanks for the confirmation, Justin.
That's what I figured...
Rick
-Original Message-
From: Justin Scott [mailto:leviat...@darktech.org]
Sent: Thursday, September 15, 2011 11:40 AM
To: cf-talk
Subject: Re: Any way to process this within onRequest in Application.cfc?
No, I'm
Thanks for the approaches, Justin...
I'll give them a try.
Rick
-Original Message-
From: Justin Scott [mailto:leviat...@darktech.org]
Sent: Thursday, September 15, 2011 11:38 AM
To: cf-talk
Subject: Re: Any way to process this within onRequest in Application.cfc?
It seems
...
No, I'm not trying to output anything to the browser, just
establish the variables, in this case the JS global variables
for use throughout the site.
I establish all the CF variables in the application.cfc and
was trying to see if I could accomplish the same thing with the
JS variables
Hello all. Long no post.
I'm currently working on a module to a an existing, sprawling site that has
grown without much planning to a size that was never anticipated.
One of the things I need to do to build my module is switch the existing
application.cfm to an application.cfc so that I can
In your Application.cfc, place your query in a persistent scope (which
depends upon context).
Change the custom tag to take the query in as an attribute.
Change the custom tag calls to include the attribute, passing in the
persistent scope var.
Or, if you really can't change the custom tag
I recently modified my Application.cfc to email all errors for debugging. While
sending the error, I referenced some email settings I saved in the application
scope. It was my understanding that OnApplicationStart() fired before anything
else, but it looks like ColdFusion is trying to parse
Sounds like either a) and error is occurring in onApplicationStart() or b)
you didn;t reinitialize your app and onApplicationStart isn;t running
since the app already exists.
nic
On 2/11/11 3:49 PM, Mike P mike...@optonline.net wrote:
I recently modified my Application.cfc to email all errors
Weird. It didn't work when I manually called OnApplicationStart, but it worked
when i restarted the server.
Sounds like either a) and error is occurring in onApplicationStart() or b)
you didn;t reinitialize your app and onApplicationStart isn;t running
since the app already exists.
nic
On
Hi Folks -
I am feeling dumb and either I am missing something simple or it's way
above me.
In my application.cfc, I was going to have a cfinclude that would pull
in my DB Name, user name, and password.
I would store those variables in application scope in onApplicationStart
Hi Folks -
I am feeling dumb and either I am missing something simple or it's way above me.
In my application.cfc, I was going to have a cfinclude that would pull in my DB
Name, user name, and password.
But when I execute the index.cfm page, and dump my session variables, those
pieces
.
In my application.cfc, I was going to have a cfinclude that would pull in
my DB Name, user name, and password.
But when I execute the index.cfm page, and dump my session variables, those
pieces of info are not being included.
I have moved the cfinclude all around from the beginning of the file
Hey Doug,
1. How many lines of code are in the include? I'm just wondering because it
might be easiest to simply move your code into the Application.CFC
2. How are you setting these vars in the include? Can you give us a sample
of that code?
3. Once you moved the code around
be easiest to simply move your code into the Application.CFC
2. How are you setting these vars in the include? Can you give us a sample
of that code?
3. Once you moved the code around and into the onApplicationStart method,
dod you rename the Application scope to force it to reload that method
On 1/27/2011 3:12 PM, Michael Grant wrote:
can't you just docfset onApplicationStart() / to get the method to fire?
Do you really need to rename the app scope?
Yes, you can /fire/ the method that way. But that is OFTEN not exactly
the same as triggering the onApplicaitonStart *event*.
Ah, I didn't know that.
On Thu, Jan 27, 2011 at 6:27 PM, Ian Skinner h...@ilsweb.com wrote:
On 1/27/2011 3:12 PM, Michael Grant wrote:
can't you just docfset onApplicationStart() / to get the method to
fire?
Do you really need to rename the app scope?
Yes, you can /fire/ the method
the method to fire?
Do you really need to rename the app scope?
On Thu, Jan 27, 2011 at 6:03 PM, Alan Rother alan.rot...@gmail.com
wrote:
Hey Doug,
1. How many lines of code are in the include? I'm just wondering because
it
might be easiest to simply move your code into the Application.CFC
can't you just docfset onApplicationStart() / to get the method to fire?
Do you really need to rename the app scope?
Yes, you can /fire/ the method that way. But that is OFTEN not exactly
the same as triggering the onApplicaitonStart *event*. Sometimes one
just really wants to
FWIW, you wouldn't get this error on Railo (due to a philosophical
difference on how function declarations actually work).
On Tue, Aug 31, 2010 at 2:04 PM, Matthew Smith chedders...@gmail.com wrote:
Ok, here is what I tried:
I removed the cfcomponent tags in the org.corfield.framework file,
Using a shared host, and currently serving several different sites based
upon conditional code.
I have just done a site in fw/1, and would like to incorporate the site into
the codebase.
The fw/1 app has this in application.cfc:
cfcomponent extends=org.corfield.framework output=false
a site in fw/1, and would like to incorporate the site
into the codebase.
The fw/1 app has this in application.cfc:
cfcomponent extends=org.corfield.framework output=false
Is there another way to do this? I would like to extend application.cfc,
but only for one domain. Is there another way
I removed the cfcomponent tags in the org.corfield.framework file, and
copied them to a folder.
I tried adding this:
cfif findnocase(domain.com,request.currentSiteDomain,1)
cfinclude template=/fw1/fw1.cfm
cfinclude template=/fw1/settings-domain-com.cfm
cfelse
!--- All my other stuff
Ok...I thought I had this worked out, but now I'm running into
path issues on my server.
What I'm trying to accomplish is this:
- I'm using an SVN service to post changes to my web server
- I commit a change to SVN, then SVN sends update to server
- On the SVN server, I have two FTP sites set
Why not activeWebroot = /hillyPetersonHome on dev and just on hph
/ production (and then use url =
#application.activeWebroot#/images/image.jpg (without the leading /)
On Wed, Aug 18, 2010 at 9:55 AM, Rick Faircloth
r...@whitestonemedia.com wrote:
Ok...I thought I had this worked out, but now
: Sean Corfield [mailto:seancorfi...@gmail.com]
Sent: Wednesday, August 18, 2010 1:09 PM
To: cf-talk
Subject: Re: How to specify different webroots for development and
production in application.cfc
Why not activeWebroot = /hillyPetersonHome on dev and just on hph
/ production (and then use url
Ok...I worked with application.cfc's for awhile
and things seemed to work fine, but then I had some
issues and went back to old reliable application.cfm.
Now, however, I'd like to try again to get a grasp on
how to use application.cfc's.
First question:
Why can I set the application.website
-talk cf-talk@houseoffusion.com
Subject: Trying to understand application.cfc...
Ok...I worked with application.cfc's for awhile
and things seemed to work fine, but then I had some
issues and went back to old reliable application.cfm.
Now, however, I'd like to try again to get a grasp on
how to use
application.website = RickFaircloth.com
/cffunction
/cfcomponent
Any wrong or missing?
-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com]
Sent: Thursday, August 12, 2010 2:17 PM
To: cf-talk
Subject: re: Trying to understand application.cfc...
I do exactly
You should be able to set that variable in OnApplicationStart() with no
problems. In fact, as you said, that's the preferred place to set it.
You must have something else going on that's causing the problem.
Thanks,
Eric Cobb
ECAR Technologies, LLC
http://www.ecartech.com
: Rick Faircloth [mailto:r...@whitestonemedia.com]
Sent: Friday, 13 August 2010 4:31 AM
To: cf-talk
Subject: RE: Trying to understand application.cfc...
Thanks for the reply, Jason...
Well...I swear, the first time I tried to set application.website inside
onApplicationStart, I got
@houseoffusion.com
Subject: RE: Trying to understand application.cfc...
Thanks for the reply, Jason...
Well...I swear, the first time I tried to set application.website
inside onApplicationStart, I got an error saying application.website
wasn't defined. Now, for some reason, it works.
The only thing
That's most likely what happened...
-Original Message-
From: Andrew Scott [mailto:andr...@andyscott.id.au]
Sent: Thursday, August 12, 2010 2:31 PM
To: cf-talk
Subject: RE: Trying to understand application.cfc...
Rick,
Is it highly possible that you had run the application
Thanks for the tip!
-Original Message-
From: Paul Day [mailto:p...@nucomsolutions.com]
Sent: Thursday, August 12, 2010 2:36 PM
To: cf-talk
Subject: RE: Trying to understand application.cfc...
Rick,
One thing I do is to place a piece of code into the onRequestStart method to
reinit
I've handled things like this in the past like so:
this.name = getAppName();
Then lower down at the bottom of the Application.cfc I do something like this:
cffunction name=getAppName returntype=string
...your if logic goes here...
cfreturn whatever /
/cffunction
-Cameron
On Tue, Aug 10, 2010
I am (finally) transitioning to Application.cfc, as we have just upgraded to
CF 9.
In my old Application.cfm, I am serving several sites/apps with conditional
code, something like this:
cfset currentSiteDomain = cgi.server_name
cfif findNoCase(domain1,currentSiteDomain,1)
cfset
Is there any good way to have a function like this included in all pages? I
can't put it in application.cfc.
cfscript
function MyDecimalFormat(some_value) {
// call DecimalFormat to handle rounding, then strip out commas
return Replace(DecimalFormat(some_value)ALL
Chad Gray wrote:
I can't put it in application.cfc.
What not? That is the *good* way to include it in every file.
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion
1 - 100 of 717 matches
Mail list logo