onApplication will only start / excute when there is no application named
with this.name.
You may need to put a ?uppdateapp=1 in your url to reset the application in
onRequestStart.
cfif isDefined(url.updateapp)
cfset result = onApplicationEnd() /
cfset result =
had the application already been run before you added the create object?
If so, you will need to restart the application (or bounce the CF service)
so the OnApplicationStart function gets executed
On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
Hi,
I create an object in Application.cfc and put
Are you sure it got created.
Possibly added the OnApplicationStart code after the app was already
started.
Dump the Application scope and see of the surveyDAO exists in it.
Regards
Dale Fraser
http://dalefraser.blogspot.com
From: cfaussie@googlegroups.com [mailto:[EMAIL
Yes. So I have to put the object in onRequestStart or top of the page to
init?
On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
had the application already been run before you added the create object?
If so, you will need to restart the application (or bounce the CF service)
so the
Dale,
I put the application scope on top of the page then it works. Maybe I should
do it as Andrew suggested. Thanks everyone.
On 07/06/07, Dale Fraser [EMAIL PROTECTED] wrote:
Are you sure it got created.
Possibly added the OnApplicationStart code after the app was already
started.
No, I've tried Andrew's method:
cffunction name=onRequestStart returnType=boolean
cfargument type=String name=targetPage required=true /
cfif isDefined(url.updateapp)
cfset result = onApplicationEnd() /
cfset result = onApplicationStart() /
I think its because you have variables.componentPath in the string to
go find it. On application start this wont exist.
Personally I would set this up as an application variable, then after
that set up the object.
On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
No, I've tried Andrew's method:
http://dalefraser.blogspot.com http://dalefraser.blogspot.com
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:51 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object
Dale,
I put the application scope
@googlegroups.com
Subject: [cfaussie] Re: Application object
No, I've tried Andrew's method:
cffunction name=onRequestStart returnType=boolean
cfargument type=String name=targetPage required=true /
cfif isDefined(url.updateapp)
cfset result
*From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *George Lu
*Sent:* Thursday, 7 June 2007 12:57 PM
*To:* cfaussie@googlegroups.com
*Subject:* [cfaussie] Re: Application object
No, I've tried Andrew's method:
cffunction name=onRequestStart returnType=boolean
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404 998 273
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:57 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object
No, I've tried Andrew's
Fraser
Sent: Thursday, 7 June 2007 1:01 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object
Yes,
Andrew's method of restarting the application is a good one. Beats
restarting CF.
Mind you be careful as to what url you need to pass the application to cause
a restart
.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404 998 273
*From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *George Lu
*Sent:* Thursday, 7 June 2007 12:57 PM
*To:* cfaussie@googlegroups.com
*Subject:* [cfaussie] Re: Application object
No, I've tried Andrew's
:[EMAIL PROTECTED] *On
Behalf Of *George Lu
*Sent:* Thursday, 7 June 2007 12:57 PM
*To:* cfaussie@googlegroups.com
*Subject:* [cfaussie] Re: Application object
No, I've tried Andrew's method:
cffunction name=onRequestStart returnType=boolean
cfargument type=String
Phone: +613 8676 4223
Mobile: 0404 998 273
*From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED]
*On Behalf Of *George Lu
*Sent:* Thursday, 7 June 2007 12:57 PM
*To:* cfaussie@googlegroups.com
*Subject:* [cfaussie] Re: Application object
*From:* cfaussie@googlegroups.com [mailto:
[EMAIL PROTECTED] *On Behalf Of *George Lu
*Sent:* Thursday, 7 June 2007 12:57 PM
*To:* cfaussie@googlegroups.com
*Subject:* [cfaussie] Re: Application object
No, I've tried Andrew's method
*From:* cfaussie@googlegroups.com [mailto:
[EMAIL PROTECTED] *On Behalf Of *George Lu
*Sent:* Thursday, 7 June 2007 12:57 PM
*To:* cfaussie@googlegroups.com
*Subject:* [cfaussie] Re: Application object
No, I've tried Andrew's method
: [cfaussie] Re: Application object
But I've been told if I change the object in cfc I have to init the object
again in myPage.cfm so the change'll happen. Is that true?
On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
no, because if the APPLICATION scope does not exist OnApplicationStart
PROTECTED] *On Behalf Of *George Lu
*Sent:* Thursday, 7 June 2007 12:57 PM
*To:* cfaussie@googlegroups.com
*Subject:* [cfaussie] Re: Application object
No, I've tried Andrew's method:
cffunction name=onRequestStart returnType
@googlegroups.com
*Subject:* [cfaussie] Re: Application object
No, I've tried Andrew's method:
cffunction name=onRequestStart returnType=boolean
cfargument type=String name=targetPage
required=true
Of *George Lu
*Sent:* Thursday, 7 June 2007 12:57 PM
*To:* cfaussie@googlegroups.com
*Subject:* [cfaussie] Re: Application object
No, I've tried Andrew's method:
cffunction name=onRequestStart
returnType=boolean
3:15 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object
you can loosen you seatbelt now, the ride wont be so bumpy. But the captain
asks that you refrain from using the REQUEST scope in case there is any
further turbulence
@googlegroups.com
*Subject:* [cfaussie] Re: Application object
No, I've tried Andrew's method:
cffunction name=onRequestStart
returnType=boolean
cfargument type=String name=targetPage
required
23 matches
Mail list logo