Taco,
I know what you are saying now, there is an answer but I have it in code I
have at home.
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404 998 273
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
I need to get working week.
Which for me is Sat - Fri.
I can't get it to work in all situations and am missing something really
obviousl.
Have a look here, but read my comments, doesn't work.
http://ray.camdenfamily.com/index.cfm/2007/6/5/Ask-a-Jedi-What-day-is-Wednes
day
I obviously don't understand what he's asking.
Is the scenario if you have an Application.cfc that sets an
Application variable to the web root on start up, and if you hit a
template in a sub directory, the wrong value is in the path?
...cause that's what:
cfoutput#expandPath(/)#/cfoutput
Which part are you not getting to work?
This is a very common JS Calendar problem that has been solved that many
times...
A bit more info on why you think it is not working would be good. Or even
code example maybe.
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
The problem is simple.
Every coldfusion template is already expanded, hence why getTemplatePath can
be beneficial. The actual problem is that when you extend a component and it
doesn't matter if it's one directory up or 10 up and 2 more in.
The extended component takes on the path of the
Thank god!
I've already solved the matter by creating a normal .cfm file and include it
in the onApplicationStart - I was just hoping for a solution that would not
involve any code outside the application.cfc
On 6/6/07, Andrew Scott [EMAIL PROTECTED] wrote:
Taco,
I know what you are
any chance of example code of what you did Taco?
It'll help me understand the issue :-)
On Jun 6, 6:23 pm, Taco Fleur [EMAIL PROTECTED] wrote:
Thank god!
I've already solved the matter by creating a normal .cfm file and include it
in the onApplicationStart - I was just hoping for a solution
Problem is my Week ends on Friday.
Not Satuarday.
Regards
Dale Fraser
http://dalefraser.blogspot.com http://dalefraser.blogspot.com
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Andrew Scott
Sent: Wednesday, 6 June 2007 4:17 PM
To:
Got it sorted dur!
!--- Sunday = 1, Satuarday = 7 ---
cfset today = createDate(2007, 6, 16) /
cfset dow = dayOfWeek(today) /
cfif dow eq 7
cfset friday = dateAdd(d, 6, today) /
cfelse
cfset friday = dateAdd(d, (dow - 6) * -1, today) /
/cfif
cfoutput#friday#/cfoutput
Not
Hi,
I have some code which has always bugged me.
!--- Initialise screen ---
div id=divDrSrch style=position:absolute; z-index:1; visibility:hidden;
top:50; left:50;
iframe id=SrchFrame
name=SrchFrame
style=width:600px; height:500px;
In the real world, the standard is that a week starts on either
Sunday(traditional), or Monday(start of working week).
I have never before heard of anyone considering that the week starts
on a Saturday.
Regards
Darren Tracey
On Jun 6, 4:41 pm, Dale Fraser [EMAIL PROTECTED] wrote:
Not sure
Created application-root.cfm with following code
cfscript
request.applicationRoot = getDirectoryFromPath( getCurrentTemplatePath() );
request.applicationRoot = reReplaceNoCase( request.applicationRoot, (
\\|/)$ file://%7C/)$, );
/cfscript
Snippet of the application.cfc
cffunction
Ordered yesterday (before 12pm) and delivered today (also before 12pm).
A 22 Acer wide screen LCD monitor for only $429.00. Must be a mistake
but I got mine right in front of me. Also grabbed a 320Gb Iomega
external USB HDD. $429 for LCD and I have seen similar (same brand)
for $699
See:
Dale,
I realise that, but the problem is that the value for Saturday is 7.
So
cfset day = DayOfWeek(now()) /
So the comparision or logic would be is
cfif (day lte 6 and day gt 0) or day eq 7
A working week
cfelse
Weekend
/cfif
Mind you this is off the top of my head
Goes back to the standard that Sunday is the start of a week.
Andrew Scott
Senior Coldfusion Developer
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 Dale Fraser
Sent: Wednesday, 6 June
Isn't 'working week' a locale specific thing?
Western work weeks are Monday to Friday, but I do know a few countries
which finish work Sun-Thurs.
Andrew Scott wrote:
Goes back to the standard that Sunday is the start of a week.
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
Yeah,
My work week ends Friday, thus from a programmatic point of view, it starts
Saturday.
Regards
Dale Fraser
http://dalefraser.blogspot.com
-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Haikal Saadh
Sent: Wednesday, 6 June 2007 5:14 PM
David, don't worry, it works for me.
On 6/6/07, David Harris [EMAIL PROTECTED] wrote:
So from what you have there, the line of code in the included file:
request.applicationRoot =
getDirectoryFromPath( getCurrentTemplatePath() );
is the one to get you the root of the application?
I would
On Wed, Jun 06, 2007 at 04:58:54PM +1000, Peter Tilbrook wrote:
Ordered yesterday (before 12pm) and delivered today (also before 12pm).
A 22 Acer wide screen LCD monitor for only $429.00. Must be a mistake
but I got mine right in front of me. Also grabbed a 320Gb Iomega
external USB HDD.
You wish Peter!
That's 3 pings gone wayward now, nice one Barrie ;)
On 6/5/07, Peter Tilbrook [EMAIL PROTECTED] wrote:
Yeah but Buzzy is on drugs and in Europe so does not count!
On 05/06/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
ping ping ping ping
It wasn't me but a colleague who did it.
I am in the process of cleaning up stuff like this.
Taco Fleur [EMAIL PROTECTED] 06/06/2007 4:56 pm
I don't have an answer for you because I don't understand the problem, but I
am wondering why you put the base_url in the session scope and not the
Hi,
I create an object in Application.cfc and put it in the application scope.
When I use it in other pages it comes up this error:
Element SURVEYDAO is undefined in a Java object of type class [
Ljava.lang.String; referenced as
The object in application.cfc:
cffunction
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:
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, obviously if this got in the wrong hands.
You can have a totally separate page if you wish, that takes some
Did you pass the url
http://site.com/pageName.cfm?updateapp=true
Regards
Dale Fraser
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:57 PM
To:
Yes, I did (myPage.cfm?updateapp=1). The page shows up then it stop work
when I pass myPage.cfm?userID=15.
On 07/06/07, Dale Fraser [EMAIL PROTECTED] wrote:
Did you pass the url
http://site.com/pageName.cfm?updateapp=true
Regards
Dale Fraser
http://dalefraser.blogspot.com
Looks like Peter got to youJ
If you set the Object up in onApplicationStart, there is no need and I mean
this!! No need to copy the Application.surveyDAO to the request scope.
I would really like to know who is teaching people to do this, can you
imagine 1000 users hitting the application
As Dale said, this can have undesired results if used in the wrong
situation. However in my case, and not everyone is the same in this regard.
But I only use that method on my development server, and prefer to have a
temp file that is deleted when it is executed to restart the application
when
Hi George,
I think you are after something more like this:
cffunction name=OnApplicationStart
cfset Application.surveyDAO = createObject(component,
variables.componentPath .components.surveyDAO).init(variables.dsn) /
cfset Application.hrSurveyObj = CreateObject(component,
Hi AJ,
That's what I did in application.cfc (see attached file as requested by
Andrew).
On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
Hi George,
I think you are after something more like this:
cffunction name=OnApplicationStart
cfset Application.surveyDAO =
Thanks AJ. But for the objects, do I need to do something like this on
myPage.cfm?
cfif NOT isDefined(Application.surveyDAO)
cfset Application.surveyDAO = createObject(component,
intranet.hr.survey.components.surveyDAO).init(HR) /
/cfif
in the event the object is not initialised.
On
no, because if the APPLICATION scope does not exist OnApplicationStart ()
will be fired
On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
Thanks AJ. But for the objects, do I need to do something like this on
myPage.cfm?
cfif NOT isDefined(Application.surveyDAO)
cfset Application.surveyDAO
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 ()
will be fired
On 6/7/07, George Lu
George,
The answer is yes, but in your case it is no. The reason being is that if
you are using DataMgr.cfc and have made changes then yes, this has to
reinitialised for the changes to take effect. So in your case
http://mydomain/?updateapp=true when you have made changes will solve that
any code inside the OnApplicationStart function will only run the first time
the application is run. So if you put in a new CreateObject() you will need
will need to do the ?updateapp=1
If you change a CFC that has already been created and stored in the
APPLICATION scope, you will also need to do
Thanks Andrew and AJ. Now I understand - once an object is initialised
in OnApplicationStart
function then it's available in every page. If the object is changed or a
new object is created after app start then we need to
reinitialise/initialise it using something like
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.
On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
Thanks Andrew and AJ. Now I understand - once an object is initialised in
*ROTFLMAO*
The funniest thing I have heard this week...
Andrew Scott
Senior Coldfusion Developer
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 AJ Mercer
Sent: Thursday, 7 June 2007
Is anyone here with more knowledge than me, which isn't hard with multi
server configurations of ColdfusionJ
Anyway here is the scenario, I have a development server that is running an
instance of Coldfusion MX 7.02 as well as Coldfusion MX 8 (I assume this is
an MX application) and am looking
:)
On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
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.
On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
Thanks Andrew and AJ.
46 matches
Mail list logo