[cfaussie] Re: Get root of the application

2007-06-06 Thread Andrew Scott
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
Of Taco Fleur
Sent: Wednesday, 6 June 2007 3:52 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get root of the application

 

I give up
 

On 6/6/07, David Harris [EMAIL PROTECTED] wrote: 


I just created a folder struct of [root]/one/two/bob.cfm
and put the code:
cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput 

in bob.cfm, and it gave me the correct web root...

I also put a onRequestStart function in my Application.cfc:

cffunction name=onRequestStart output=true
p
here: cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
/p
/cffunction

ran /one/two/bob.cfm...and the correct web root was output


so from my testing 
cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

works every time...

On Jun 6, 5:30 pm, Taco Fleur [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:
 If you put this in the main application.cfc file and then make sure the
app
 is not initialized, call a page within the sub directory (i.e. the one
where
 the application.cfc is that extends the main one) then you will get the
path 
 of the sub directory and not the main root.

 I've now created a .cfm file that is included onApplicationStart and sets
 the appropiate variable.

 On 6/6/07, David Harris  [EMAIL PROTECTED] wrote:







  how bout this?:

  cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput 

  On Jun 6, 2:45 pm, Taco Fleur [EMAIL PROTECTED] wrote:
   Does that work for you if you put it in an application.cfc that
extends 
  the
   root application.cfc, and access a page in that sub directory first,
  also
   make sure the app is not initialised yet.

   Let me know.. 

   On 6/6/07, Andrew Scott [EMAIL PROTECTED] wrote:

 This not work for you, sure works for me?
 
getDirectoryFromPath(getCurrentTemplatePath())

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 *Taco Fleur
*Sent:* Wednesday, 6 June 2007 12:31 PM 
*To:* cfaussie@googlegroups.com
*Subject:* [cfaussie] Get root of the application

Hi all,
 
I used be able to get the root of an application by putting
something
  like
getCurrentTemplate() in the root application.cfm, even if I included
  the
root application.cfm in sub application.cfm files it would record
the
right path, i.e. that of the root.

Now with the application.cfc I cannot get the right path anymore, 
  because
if the application is initialised through an application.cfc in a
sub
directory, it reports the path of that sub directory. I've also
tried
  all 
other functions like getBaseTemplate etc. nothing gives me the right
  output,
the path of the root application.cfc is what I am after.

Only thing I can think of is putting a cfm file in the root that 
  outputs
the path I am after. I don't like hard coding it.

Thanks.

--
http://www.clickfind.com.au  http://www.clickfind.com.au
The new Australian search engine for businesses, products and
services

   --
   *** { . } { . }  http://www.clickfind.com.au
http://www.clickfind.com.au
   The new Australian search engine for businesses, products and
services-
  Hide quoted text -

   - Show quoted text -

 --
 *** { . } { . } http://www.clickfind.com.au
 The new Australian search engine for businesses, products and services-
Hide quoted text -

 - Show quoted text - 


http://www.clickfind.com.au 
The new Australian search engine for businesses, products and services 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Get Working Week

2007-06-06 Thread Dale Fraser
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

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get root of the application

2007-06-06 Thread David Harris

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

...does...not matter where in the Application it is run...based on the
testing I have done anyway

On Jun 6, 5:59 pm, Andrew Scott [EMAIL PROTECTED] wrote:
 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
 Of Taco Fleur
 Sent: Wednesday, 6 June 2007 3:52 PM
 To: cfaussie@googlegroups.com
 Subject: [cfaussie] Re: Get root of the application

 I give up

 On 6/6/07, David Harris [EMAIL PROTECTED] wrote:

 I just created a folder struct of [root]/one/two/bob.cfm
 and put the code:
 cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

 in bob.cfm, and it gave me the correct web root...

 I also put a onRequestStart function in my Application.cfc:

 cffunction name=onRequestStart output=true
 p
 here: cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 /p
 /cffunction

 ran /one/two/bob.cfm...and the correct web root was output

 so from my testing
 cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

 works every time...

 On Jun 6, 5:30 pm, Taco Fleur [EMAIL PROTECTED]



 mailto:[EMAIL PROTECTED]  wrote:
  If you put this in the main application.cfc file and then make sure the
 app
  is not initialized, call a page within the sub directory (i.e. the one
 where
  the application.cfc is that extends the main one) then you will get the
 path
  of the sub directory and not the main root.

  I've now created a .cfm file that is included onApplicationStart and sets
  the appropiate variable.

  On 6/6/07, David Harris  [EMAIL PROTECTED] wrote:

   how bout this?:

   cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

   On Jun 6, 2:45 pm, Taco Fleur [EMAIL PROTECTED] wrote:
Does that work for you if you put it in an application.cfc that
 extends
   the
root application.cfc, and access a page in that sub directory first,
   also
make sure the app is not initialised yet.

Let me know..

On 6/6/07, Andrew Scott [EMAIL PROTECTED] wrote:

  This not work for you, sure works for me?

 getDirectoryFromPath(getCurrentTemplatePath())

 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 *Taco Fleur
 *Sent:* Wednesday, 6 June 2007 12:31 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Get root of the application

 Hi all,

 I used be able to get the root of an application by putting
 something
   like
 getCurrentTemplate() in the root application.cfm, even if I included
   the
 root application.cfm in sub application.cfm files it would record
 the
 right path, i.e. that of the root.

 Now with the application.cfc I cannot get the right path anymore,
   because
 if the application is initialised through an application.cfc in a
 sub
 directory, it reports the path of that sub directory. I've also
 tried
   all
 other functions like getBaseTemplate etc. nothing gives me the right
   output,
 the path of the root application.cfc is what I am after.

 Only thing I can think of is putting a cfm file in the root that
   outputs
 the path I am after. I don't like hard coding it.

 Thanks.

 --
 http://www.clickfind.com.au  http://www.clickfind.com.au
 The new Australian search engine for businesses, products and
 services

--
*** { . } { . }  http://www.clickfind.com.au

 http://www.clickfind.com.au

The new Australian search engine for businesses, products and
 services-
   Hide quoted text -

- Show quoted text -

  --
  *** { . } { . } http://www.clickfind.com.au
  The new Australian search engine for businesses, products and services-
 Hide quoted text -

  - Show quoted text -

 http://www.clickfind.com.au
 The new Australian search engine for businesses, products and services- Hide 
 quoted text -

 - Show quoted text -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Andrew Scott
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.
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 2007 4:00 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Get Working Week

 

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

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get root of the application

2007-06-06 Thread Andrew Scott

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 component that uses it, this
is Taco's problem there is a solution I just don't have it on the top of my
head.

Which means Taco has just identified the same problem I have been trying to
get the Coldfusion Development team to acknowledge with the new per
application mappings.


Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273



-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of David Harris
Sent: Wednesday, 6 June 2007 4:14 PM
To: cfaussie
Subject: [cfaussie] Re: Get root of the application


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

...does...not matter where in the Application it is run...based on the
testing I have done anyway

On Jun 6, 5:59 pm, Andrew Scott [EMAIL PROTECTED] wrote:
 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
 Of Taco Fleur
 Sent: Wednesday, 6 June 2007 3:52 PM
 To: cfaussie@googlegroups.com
 Subject: [cfaussie] Re: Get root of the application

 I give up

 On 6/6/07, David Harris [EMAIL PROTECTED] wrote:

 I just created a folder struct of [root]/one/two/bob.cfm
 and put the code:
 cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

 in bob.cfm, and it gave me the correct web root...

 I also put a onRequestStart function in my Application.cfc:

 cffunction name=onRequestStart output=true
 p
 here: cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 /p
 /cffunction

 ran /one/two/bob.cfm...and the correct web root was output

 so from my testing
 cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

 works every time...

 On Jun 6, 5:30 pm, Taco Fleur [EMAIL PROTECTED]



 mailto:[EMAIL PROTECTED]  wrote:
  If you put this in the main application.cfc file and then make sure the
 app
  is not initialized, call a page within the sub directory (i.e. the one
 where
  the application.cfc is that extends the main one) then you will get the
 path
  of the sub directory and not the main root.

  I've now created a .cfm file that is included onApplicationStart and
sets
  the appropiate variable.

  On 6/6/07, David Harris  [EMAIL PROTECTED] wrote:

   how bout this?:

   cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

   On Jun 6, 2:45 pm, Taco Fleur [EMAIL PROTECTED] wrote:
Does that work for you if you put it in an application.cfc that
 extends
   the
root application.cfc, and access a page in that sub directory first,
   also
make sure the app is not initialised yet.

Let me know..

On 6/6/07, Andrew Scott [EMAIL PROTECTED] wrote:

  This not work for you, sure works for me?

 getDirectoryFromPath(getCurrentTemplatePath())

 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 *Taco Fleur
 *Sent:* Wednesday, 6 June 2007 12:31 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Get root of the application

 Hi all,

 I used be able to get the root of an application by putting
 something
   like
 getCurrentTemplate() in the root application.cfm, even if I
included
   the
 root application.cfm in sub application.cfm files it would record
 the
 right path, i.e. that of the root.

 Now with the application.cfc I cannot get the right path anymore,
   because
 if the application is initialised through an application.cfc in a
 sub
 directory, it reports the path of that sub directory. I've also
 tried
   all
 other functions like getBaseTemplate etc. nothing gives me the
right
   output,
 the path of the root application.cfc is what I am after.

 Only thing I can think of is putting a cfm file in the root that
   outputs
 the path I am after. I don't like hard coding it.

 Thanks.

 --
 http://www.clickfind.com.au  http://www.clickfind.com.au
 The new Australian search engine for businesses, products and
 services

--
*** { . } { . }  http://www.clickfind.com.au

 http://www.clickfind.com.au

The new Australian search engine for businesses, products and
 services-
   Hide 

[cfaussie] Re: Get root of the application

2007-06-06 Thread Taco Fleur
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 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 Of *Taco Fleur
 *Sent:* Wednesday, 6 June 2007 3:52 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Re: Get root of the application



 I give up


 On 6/6/07, *David Harris* [EMAIL PROTECTED] wrote:


 I just created a folder struct of [root]/one/two/bob.cfm
 and put the code:
 cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

 in bob.cfm, and it gave me the correct web root...

 I also put a onRequestStart function in my Application.cfc:

 cffunction name=onRequestStart output=true
 p
 here: cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 /p
 /cffunction

 ran /one/two/bob.cfm...and the correct web root was output


 so from my testing
 cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

 works every time...

 On Jun 6, 5:30 pm, Taco Fleur [EMAIL PROTECTED]  wrote:
  If you put this in the main application.cfc file and then make sure the
 app
  is not initialized, call a page within the sub directory (i.e. the one
 where
  the application.cfc is that extends the main one) then you will get the
 path
  of the sub directory and not the main root.
 
  I've now created a .cfm file that is included onApplicationStart and
 sets
  the appropiate variable.
 
  On 6/6/07, David Harris  [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
 
   how bout this?:
 
   cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 
   On Jun 6, 2:45 pm, Taco Fleur [EMAIL PROTECTED] wrote:
Does that work for you if you put it in an application.cfc that
 extends
   the
root application.cfc, and access a page in that sub directory first,
   also
make sure the app is not initialised yet.
 
Let me know..
 
On 6/6/07, Andrew Scott [EMAIL PROTECTED] wrote:
 
  This not work for you, sure works for me?
 
 getDirectoryFromPath(getCurrentTemplatePath())
 
 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 *Taco Fleur
 *Sent:* Wednesday, 6 June 2007 12:31 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Get root of the application
 
 Hi all,
 
 I used be able to get the root of an application by putting
 something
   like
 getCurrentTemplate() in the root application.cfm, even if I
 included
   the
 root application.cfm in sub application.cfm files it would record
 the
 right path, i.e. that of the root.
 
 Now with the application.cfc I cannot get the right path anymore,
   because
 if the application is initialised through an application.cfc in a
 sub
 directory, it reports the path of that sub directory. I've also
 tried
   all
 other functions like getBaseTemplate etc. nothing gives me the
 right
   output,
 the path of the root application.cfc is what I am after.
 
 Only thing I can think of is putting a cfm file in the root that
   outputs
 the path I am after. I don't like hard coding it.
 
 Thanks.
 
 --
 http://www.clickfind.com.au
 The new Australian search engine for businesses, products and
 services
 
--
*** { . } { . }  http://www.clickfind.com.au
The new Australian search engine for businesses, products and
 services-
   Hide quoted text -
 
- Show quoted text -
 
  --
  *** { . } { . } http://www.clickfind.com.au
  The new Australian search engine for businesses, products and services-
 Hide quoted text -
 
  - Show quoted text -


 http://www.clickfind.com.au
 The new Australian search engine for businesses, products and services

 



-- 
*** { . } { . } 
http://www.clickfind.com.au
The new Australian search engine for businesses, products and services

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get root of the application

2007-06-06 Thread David Harris

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 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 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 Of *Taco Fleur
  *Sent:* Wednesday, 6 June 2007 3:52 PM
  *To:* cfaussie@googlegroups.com
  *Subject:* [cfaussie] Re: Get root of the application

  I give up

  On 6/6/07, *David Harris* [EMAIL PROTECTED] wrote:

  I just created a folder struct of [root]/one/two/bob.cfm
  and put the code:
  cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

  in bob.cfm, and it gave me the correct web root...

  I also put a onRequestStart function in my Application.cfc:

  cffunction name=onRequestStart output=true
  p
  here: cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
  /p
  /cffunction

  ran /one/two/bob.cfm...and the correct web root was output

  so from my testing
  cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

  works every time...

  On Jun 6, 5:30 pm, Taco Fleur [EMAIL PROTECTED]  wrote:
   If you put this in the main application.cfc file and then make sure the
  app
   is not initialized, call a page within the sub directory (i.e. the one
  where
   the application.cfc is that extends the main one) then you will get the
  path
   of the sub directory and not the main root.

   I've now created a .cfm file that is included onApplicationStart and
  sets
   the appropiate variable.

   On 6/6/07, David Harris  [EMAIL PROTECTED] wrote:

how bout this?:

cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput

On Jun 6, 2:45 pm, Taco Fleur [EMAIL PROTECTED] wrote:
 Does that work for you if you put it in an application.cfc that
  extends
the
 root application.cfc, and access a page in that sub directory first,
also
 make sure the app is not initialised yet.

 Let me know..

 On 6/6/07, Andrew Scott [EMAIL PROTECTED] wrote:

   This not work for you, sure works for me?

  getDirectoryFromPath(getCurrentTemplatePath())

  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 *Taco Fleur
  *Sent:* Wednesday, 6 June 2007 12:31 PM
  *To:* cfaussie@googlegroups.com
  *Subject:* [cfaussie] Get root of the application

  Hi all,

  I used be able to get the root of an application by putting
  something
like
  getCurrentTemplate() in the root application.cfm, even if I
  included
the
  root application.cfm in sub application.cfm files it would record
  the
  right path, i.e. that of the root.

  Now with the application.cfc I cannot get the right path anymore,
because
  if the application is initialised through an application.cfc in a
  sub
  directory, it reports the path of that sub directory. I've also
  tried
all
  other functions like getBaseTemplate etc. nothing gives me the
  right
output,
  the path of the root application.cfc is what I am after.

  Only thing I can think of is putting a cfm file in the root that
outputs
  the path I am after. I don't like hard coding it.

  Thanks.

  --
 http://www.clickfind.com.au
  The new Australian search engine for businesses, products and
  services

 --
 *** { . } { . } http://www.clickfind.com.au
 The new Australian search engine for businesses, products and
  services-
Hide quoted text -

 - Show quoted text -

   --
   *** { . } { . } http://www.clickfind.com.au
   The new Australian search engine for businesses, products and services-
  Hide quoted text -

   - Show quoted text -

 http://www.clickfind.com.au
  The new Australian search engine for businesses, products and services

 --
 *** { . } { . } http://www.clickfind.com.au
 The new Australian search engine for businesses, products and services- Hide 
 quoted text -

 - Show quoted text -


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Dale Fraser
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: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

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.
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 2007 4:00 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Get Working Week

 

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

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

 

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Dale Fraser
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 sure why Coldfusion starts the week on a Sunday, is this some kind of
standard, not in the real world I would think.

 

Regards

Dale Fraser

 

 http://dalefraser.blogspot.com http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Wednesday, 6 June 2007 4:33 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

Problem is my Week ends on Friday.

 

Not Satuarday.

 

Regards

Dale Fraser

 

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: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

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.
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 2007 4:00 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Get Working Week

 

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

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

 

 

 

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] OT: Root relative paths and Iframe source

2007-06-06 Thread Scott Thornton

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; border: medium;

src=#session.base_url#SBSR02.cfm?DrType=initialiseDR=qwertyUnique=#Trim(TimeFormat(Now(),'mmss'))#/iframe
 
/div

Its the #session.base_url# which bugs me. It makes pointing to our live 
database from my local server hard because the session.base_url will contain 
(from the live database) the live URL. http://myapp/ The search frame will not 
work in this instance. ( I guess it because 1. Its a different server 2. Not 
logged on etc )

I thought I could perhaps use root relative paths eg /sbsr02.cfm.

The error I then encounter is sbsr02.cfm can't be found because the server is 
looking for the file under c:\inetpub\wwwroot\ rather than the applications 
directory structure (say d:\websites\myapp\ ). I had debugging turned on and 
saw it looking for the file under c:\.

The website http://127.0.0.1/myapp/ is a virtual directory running on IIS. 

I would have thought it would look for the file under 
d:\websites\myapp\sbsr02.cfm 

(it was taco's post that got be wondering about this again).

Any Advice?




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Darren Tracey

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 why Coldfusion starts the week on a Sunday, is this some kind of
 standard, not in the real world I would think.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get root of the application

2007-06-06 Thread Taco Fleur
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
  name=onApplicationStart
  returntype=boolean
  output=false

  cfinclude template=application-root.cfm
  cfscript
   variables.mode = unknown;
   result = reFindNocase( (
\\|/)+(development|testing|staging|production)(\\|/file://%7C/)+(development%7Ctesting%7Cstaging%7Cproduction)(//%7C/)+,
request.applicationRoot, 1, true );
   if ( arrayLen( result.pos ) gt 1 ) {
variables.mode = mid( request.applicationRoot, result.pos[ 3 ],
result.len[ 3 ] );
   }
  /cfscript
  cfparam
   name=application.web.root
   default=
   type=string
  cfparam
   name=application.root
   default=/#this.application_name#
   type=string
  cfparam
   name=application.mode
   default=#variables.mode#
   type=string



On 6/6/07, David Harris [EMAIL PROTECTED] wrote:


 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 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 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 Of *Taco Fleur
   *Sent:* Wednesday, 6 June 2007 3:52 PM
   *To:* cfaussie@googlegroups.com
   *Subject:* [cfaussie] Re: Get root of the application
 
   I give up
 
   On 6/6/07, *David Harris* [EMAIL PROTECTED] wrote:
 
   I just created a folder struct of [root]/one/two/bob.cfm
   and put the code:
   cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 
   in bob.cfm, and it gave me the correct web root...
 
   I also put a onRequestStart function in my Application.cfc:
 
   cffunction name=onRequestStart output=true
   p
   here: cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
   /p
   /cffunction
 
   ran /one/two/bob.cfm...and the correct web root was output
 
   so from my testing
   cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 
   works every time...
 
   On Jun 6, 5:30 pm, Taco Fleur [EMAIL PROTECTED]  wrote:
If you put this in the main application.cfc file and then make sure
 the
   app
is not initialized, call a page within the sub directory (i.e. the
 one
   where
the application.cfc is that extends the main one) then you will get
 the
   path
of the sub directory and not the main root.
 
I've now created a .cfm file that is included onApplicationStart and
   sets
the appropiate variable.
 
On 6/6/07, David Harris  [EMAIL PROTECTED] wrote:
 
 how bout this?:
 
 cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 
 On Jun 6, 2:45 pm, Taco Fleur [EMAIL PROTECTED] wrote:
  Does that work for you if you put it in an application.cfc that
   extends
 the
  root application.cfc, and access a page in that sub directory
 first,
 also
  make sure the app is not initialised yet.
 
  Let me know..
 
  On 6/6/07, Andrew Scott [EMAIL PROTECTED] wrote:
 
This not work for you, sure works for me?
 
   getDirectoryFromPath(getCurrentTemplatePath())
 
   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 *Taco Fleur
   *Sent:* Wednesday, 6 June 2007 12:31 PM
   *To:* cfaussie@googlegroups.com
   *Subject:* [cfaussie] Get root of the application
 
   Hi all,
 
   I used be able to get the root of an application by putting
   something
 like
   getCurrentTemplate() in the root application.cfm, even if I
   included
 the
   root application.cfm in sub application.cfm files it would
 record
   the
   right path, i.e. that of the root.
 
   Now with the application.cfc I cannot get the right path
 anymore,
 because
   if the application is initialised through an application.cfcin a
   sub
   directory, it reports the path of that sub directory. I've
 also
   tried
 all
   other functions like getBaseTemplate etc. nothing gives me the
   right
 output,
   the path of the root application.cfc is what I am after.
 
   Only thing I can think of is putting a cfm file in the root
 that
 outputs
   the path I am after. I don't like hard coding it.
 
   

[cfaussie] SOT: A bargain LCD screen

2007-06-06 Thread Peter Tilbrook

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:

ACAL2216WD at OfficeWorks.com.au

And:

Iomega 320GB External Hard Drive ($179)

OfficeWorks. It works!

-- 
Peter Tilbrook
ColdGen Internet Solutions
President, ACT and Region ColdFusion Users Group
PO Box 2247
Queanbeyan, NSW, 2620
AUSTRALIA

http://www.coldgen.com/
http://www.actcfug.com/

Tel: +61-2-6284-2727
Mob: +61-0432-897-437

Email: [EMAIL PROTECTED]
MSN Messenger Live: Desktop General

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Andrew Scott
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



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 2007 4:33 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

Problem is my Week ends on Friday.

 

Not Satuarday.

 

Regards

Dale Fraser

 

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: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

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.
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 2007 4:00 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Get Working Week

 

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

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

 

 

 

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Andrew Scott
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 2007 4:41 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

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 sure why Coldfusion starts the week on a Sunday, is this some kind of
standard, not in the real world I would think.

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Dale Fraser
Sent: Wednesday, 6 June 2007 4:33 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

Problem is my Week ends on Friday.

 

Not Satuarday.

 

Regards

Dale Fraser

 

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: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week

 

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.
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 2007 4:00 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Get Working Week

 

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

 

Regards

Dale Fraser

 

http://dalefraser.blogspot.com

 

 

 

 

 

 

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Haikal Saadh

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.
 www.aegeon.com.au http://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 2007 4:41 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Re: Get Working Week

 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 sure why Coldfusion starts the week on a Sunday, is this some kind 
 of standard, not in the real world I would think.

 Regards

 Dale Fraser

 http://dalefraser.blogspot.com

 *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *Dale Fraser
 *Sent:* Wednesday, 6 June 2007 4:33 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Re: Get Working Week

 Problem is my Week ends on Friday.

 Not Satuarday.

 Regards

 Dale Fraser

 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:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Re: Get Working Week

 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.
 www.aegeon.com.au http://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 2007 4:00 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Get Working Week

 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-Wednesday

 Regards

 Dale Fraser

 http://dalefraser.blogspot.com



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get Working Week

2007-06-06 Thread Dale Fraser

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
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Get Working Week


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.
 www.aegeon.com.au http://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 2007 4:41 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Re: Get Working Week

 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 sure why Coldfusion starts the week on a Sunday, is this some kind 
 of standard, not in the real world I would think.

 Regards

 Dale Fraser

 http://dalefraser.blogspot.com

 *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of *Dale Fraser
 *Sent:* Wednesday, 6 June 2007 4:33 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Re: Get Working Week

 Problem is my Week ends on Friday.

 Not Satuarday.

 Regards

 Dale Fraser

 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:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Re: Get Working Week

 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.
 www.aegeon.com.au http://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 2007 4:00 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Get Working Week

 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

 Regards

 Dale Fraser

 http://dalefraser.blogspot.com



 






--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Get root of the application

2007-06-06 Thread Taco Fleur
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 expect:
 expandPath(/)

 to give you that too, no matter where in the application you run it,
 from a .cfm or a .cfc, 1 folder deep or 10 folders deep

 I have only tested this on my dev machine, and it returns C:\Inetpub
 \wwwroot\, which is my web root, no matter where I called it from

 What did you get when you tried that snippet in your testing?

 On Jun 6, 6:53 pm, Taco Fleur [EMAIL PROTECTED] wrote:
  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
name=onApplicationStart
returntype=boolean
output=false
 
cfinclude template=application-root.cfm
cfscript
 variables.mode = unknown;
 result = reFindNocase( (
 
 \\|/)+(development|testing|staging|production)(\\|/file://%7C/)+(developme-nt%7Ctesting%7Cstaging%7Cproduction)(//%7C/)+,
  request.applicationRoot, 1, true );
 if ( arrayLen( result.pos ) gt 1 ) {
  variables.mode = mid( request.applicationRoot, result.pos[ 3 ],
  result.len[ 3 ] );
 }
/cfscript
cfparam
 name=application.web.root
 default=
 type=string
cfparam
 name=application.root
 default=/#this.application_name#
 type=string
cfparam
 name=application.mode
 default=#variables.mode#
 type=string
 
  On 6/6/07, David Harris [EMAIL PROTECTED] wrote:
 
 
 
 
 
 
 
   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 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 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 Of *Taco Fleur
 *Sent:* Wednesday, 6 June 2007 3:52 PM
 *To:* cfaussie@googlegroups.com
 *Subject:* [cfaussie] Re: Get root of the application
 
 I give up
 
 On 6/6/07, *David Harris* [EMAIL PROTECTED] wrote:
 
 I just created a folder struct of [root]/one/two/bob.cfm
 and put the code:
 cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 
 in bob.cfm, and it gave me the correct web root...
 
 I also put a onRequestStart function in my Application.cfc:
 
 cffunction name=onRequestStart output=true
 p
 here: cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 /p
 /cffunction
 
 ran /one/two/bob.cfm...and the correct web root was output
 
 so from my testing
 cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 
 works every time...
 
 On Jun 6, 5:30 pm, Taco Fleur [EMAIL PROTECTED]  wrote:
  If you put this in the main application.cfc file and then make
 sure
   the
 app
  is not initialized, call a page within the sub directory (i.e.
 the
   one
 where
  the application.cfc is that extends the main one) then you will
 get
   the
 path
  of the sub directory and not the main root.
 
  I've now created a .cfm file that is included onApplicationStart
 and
 sets
  the appropiate variable.
 
  On 6/6/07, David Harris  [EMAIL PROTECTED] wrote:
 
   how bout this?:
 
   cfoutput#getDirectoryFromPath(expandPath(/))#/cfoutput
 
   On Jun 6, 2:45 pm, Taco Fleur [EMAIL PROTECTED] wrote:
Does that work for you if you put it in an application.cfcthat
 extends
   the
root application.cfc, and access a page in that sub
 directory
   first,
   also
make sure the app is not initialised yet.
 
Let me know..
 
On 6/6/07, Andrew Scott [EMAIL PROTECTED] wrote:
 
  This not work for you, sure works for me?
 
 getDirectoryFromPath(getCurrentTemplatePath())
 
 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 *Taco Fleur
 *Sent:* Wednesday, 6 June 2007 12:31 PM
 *To:* 

[cfaussie] Re: SOT: A bargain LCD screen

2007-06-06 Thread phaddon

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. $429 for LCD and I have seen similar (same brand)

Sites like www.ausprices.com and www.shopbot.com.au can turn up 
prices lower than that every day.

Wouldn't this be better suited to the watercooler forum?



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: CFAussie Community Head Count

2007-06-06 Thread MrBuzzy

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
 
 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] OT: Root relative paths and Iframe source

2007-06-06 Thread Scott Thornton

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
application scope (I might be missing something here).




On 6/6/07, Scott Thornton [EMAIL PROTECTED] wrote:


 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; border: medium;

 src=#session.base_url#SBSR02.cfm?DrType=initialiseDR=qwertyUnique=#Trim(TimeFormat(Now(),'mmss'))#/iframe
 /div

 Its the #session.base_url# which bugs me. It makes pointing to our live
 database from my local server hard because the session.base_url will
 contain (from the live database) the live URL. http://myapp/ The search
 frame will not work in this instance. ( I guess it because 1. Its a
 different server 2. Not logged on etc )

 I thought I could perhaps use root relative paths eg /sbsr02.cfm.

 The error I then encounter is sbsr02.cfm can't be found because the server
 is looking for the file under c:\inetpub\wwwroot\ rather than the
 applications directory structure (say d:\websites\myapp\ ). I had debugging
 turned on and saw it looking for the file under c:\.

 The website http://127.0.0.1/myapp/ is a virtual directory running on IIS.

 I would have thought it would look for the file under
 d:\websites\myapp\sbsr02.cfm 

 (it was taco's post that got be wondering about this again).

 Any Advice?




 



-- 
*** { . } { . } 
http://www.clickfind.com.au 
The new Australian search engine for businesses, products and services




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Application object

2007-06-06 Thread George Lu
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 name=OnApplicationStart
cfset Application.surveyDAO = createObject(component,
variables.componentPath  .components.surveyDAO).init(variables.dsn) /
cfset Application.hrSurveyObj = CreateObject(component,
CFC.DataMgr).init(HR,MSSQL) /
/cffunction

The code causing the error:
cfset Application.surveyDAO.delete(url.userID) /

Please help!

George

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
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 = onApplicationStart() /

/cfif



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
 http://www.aegeon.com.au 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:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

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 name=OnApplicationStart
cfset Application.surveyDAO =
createObject(component,variables.componentPath 
.components.surveyDAO).init(variables.dsn) /
cfset Application.hrSurveyObj = CreateObject(component,
CFC.DataMgr).init(HR,MSSQL) /
/cffunction

The code causing the error:
cfset Application.surveyDAO.delete(url.userID) /

Please help!

George




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
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 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 name=OnApplicationStart
 cfset Application.surveyDAO = createObject(component,
 variables.componentPath  .components.surveyDAO).init(variables.dsn) /
 cfset Application.hrSurveyObj = CreateObject(component,
 CFC.DataMgr).init(HR,MSSQL) /
 /cffunction

 The code causing the error:
 cfset Application.surveyDAO.delete(url.userID) /

 Please help!

 George


 



-- 
If you are not living on the edge,
You are taking up too much space.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Dale Fraser
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 PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

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 name=OnApplicationStart
cfset Application.surveyDAO =
createObject(component,variables.componentPath 
.components.surveyDAO).init(variables.dsn) /
cfset Application.hrSurveyObj = CreateObject(component,
CFC.DataMgr).init(HR,MSSQL) /
/cffunction

The code causing the error:
cfset Application.surveyDAO.delete(url.userID) /

Please help!

George




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
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 OnApplicationStart function gets executed

 On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
 
  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 name=OnApplicationStart
  cfset Application.surveyDAO = createObject(component,
  variables.componentPath  .components.surveyDAO).init(variables.dsn)
  /
  cfset Application.hrSurveyObj = CreateObject(component,
  CFC.DataMgr).init(HR,MSSQL) /
  /cffunction
 
  The code causing the error:
  cfset Application.surveyDAO.delete(url.userID) /
 
  Please help!
 
  George
 
 
 
 


 --
 If you are not living on the edge,
 You are taking up too much space.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
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.



 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 PROTECTED] *On
 Behalf Of *George Lu
 *Sent:* Thursday, 7 June 2007 12:32 PM
 *To:* CFAussie Mailing List
 *Subject:* [cfaussie] Application object



 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 name=OnApplicationStart
 cfset Application.surveyDAO = createObject(component,
 variables.componentPath  .components.surveyDAO).init(variables.dsn) /
 cfset Application.hrSurveyObj = CreateObject(component,
 CFC.DataMgr).init(HR,MSSQL) /
 /cffunction

 The code causing the error:
 cfset Application.surveyDAO.delete(url.userID) /

 Please help!

 George



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
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() /
/cfif

cfset request.componentPath = variables.componentPath /
cfset request.surveyDAO = Application.surveyDAO /
cfset request.dsn = variables.dsn /

cfreturn true
/cffunction

and the same error again.

On 07/06/07, George Lu [EMAIL PROTECTED] wrote:

 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.
 
 
 
  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 PROTECTED] *On
  Behalf Of *George Lu
  *Sent:* Thursday, 7 June 2007 12:32 PM
  *To:* CFAussie Mailing List
  *Subject:* [cfaussie] Application object
 
 
 
  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 name=OnApplicationStart
  cfset Application.surveyDAO = createObject(component,
  variables.componentPath  .components.surveyDAO).init(variables.dsn)
  /
  cfset Application.hrSurveyObj = CreateObject(component,
  CFC.DataMgr).init(HR,MSSQL) /
  /cffunction
 
  The code causing the error:
  cfset Application.surveyDAO.delete(url.userID) /
 
  Please help!
 
  George
 
 
 
   
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Duncan

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:

  cffunction name=onRequestStart returnType=boolean
 cfargument type=String name=targetPage required=true /

 cfif isDefined(url.updateapp)
 cfset result = onApplicationEnd() /
 cfset result = onApplicationStart() /
 /cfif

 cfset request.componentPath = variables.componentPath /
 cfset request.surveyDAO = Application.surveyDAO /
 cfset request.dsn = variables.dsn /

  cfreturn true
 /cffunction

 and the same error again.


 On 07/06/07, George Lu [EMAIL PROTECTED] wrote:
  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.
  
  
  
   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 PROTECTED] On
 Behalf Of George Lu
   Sent: Thursday, 7 June 2007 12:32 PM
   To: CFAussie Mailing List
   Subject: [cfaussie] Application object
  
  
  
  
   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 name=OnApplicationStart
   cfset Application.surveyDAO =
 createObject(component,variables.componentPath 
 .components.surveyDAO).init(variables.dsn) /
   cfset Application.hrSurveyObj = CreateObject(component,
 CFC.DataMgr).init(HR,MSSQL) /
   /cffunction
  
   The code causing the error:
   cfset Application.surveyDAO.delete(url.userID) /
  
   Please help!
  
   George
  
  
  
  
  
 
 


  



-- 
Duncan I Loxton
[EMAIL PROTECTED]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Dale Fraser
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 type of
password.

 

http://www.site.com/appRestart.cfm

 

This could ask for a password and restart the app by calling the Application
methods Andrew used.

 

This way the method of restarting your app doesn't end up in browser caches
etc, at least not the password bit.

 

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:51 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Application object

 

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.

 

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 PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

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 name=OnApplicationStart
cfset Application.surveyDAO =
createObject(component,variables.componentPath 
.components.surveyDAO).init(variables.dsn) /
cfset Application.hrSurveyObj = CreateObject(component,
CFC.DataMgr).init(HR,MSSQL) /
/cffunction

The code causing the error:
cfset Application.surveyDAO.delete(url.userID) /

Please help!

George



 

 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Dale Fraser
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: cfaussie@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 = onApplicationEnd() /
cfset result = onApplicationStart() /
/cfif 

cfset request.componentPath = variables.componentPath /
cfset request.surveyDAO = Application.surveyDAO /
cfset request.dsn = variables.dsn /

cfreturn true
/cffunction 

and the same error again.

On 07/06/07, George Lu [EMAIL PROTECTED] wrote:

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.

 

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 PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

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 name=OnApplicationStart
cfset Application.surveyDAO =
createObject(component,variables.componentPath 
.components.surveyDAO).init(variables.dsn) /
cfset Application.hrSurveyObj = CreateObject(component,
CFC.DataMgr).init(HR,MSSQL) /
/cffunction

The code causing the error:
cfset Application.surveyDAO.delete(url.userID) /

Please help!

George



 

 

 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
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



 *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
 cfargument type=String name=targetPage required=true /

 cfif isDefined(url.updateapp)
 cfset result = onApplicationEnd() /
 cfset result = onApplicationStart() /
 /cfif

 cfset request.componentPath = variables.componentPath /
 cfset request.surveyDAO = Application.surveyDAO /
 cfset request.dsn = variables.dsn /

 cfreturn true
 /cffunction

 and the same error again.

 On 07/06/07, *George Lu* [EMAIL PROTECTED] wrote:

 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.



 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 PROTECTED] *On
 Behalf Of *George Lu
 *Sent:* Thursday, 7 June 2007 12:32 PM
 *To:* CFAussie Mailing List
 *Subject:* [cfaussie] Application object



 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 name=OnApplicationStart
 cfset Application.surveyDAO = createObject(component,
 variables.componentPath  .components.surveyDAO).init(variables.dsn) /
 cfset Application.hrSurveyObj = CreateObject(component,
 CFC.DataMgr).init(HR,MSSQL) /
 /cffunction

 The code causing the error:
 cfset Application.surveyDAO.delete(url.userID) /

 Please help!

 George










 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
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 and how many extra ram is wasted
by such a method.. Peter might like doing this and wasting valuable
resources, but it should not be a practice taken upon.

 

If you want to email me your application.cfc, I will modify it and get it to
work for you.



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 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 name=targetPage required=true / 

cfif isDefined(url.updateapp)
cfset result = onApplicationEnd() /
cfset result = onApplicationStart() /
/cfif 

cfset request.componentPath = variables.componentPath /
cfset request.surveyDAO = Application.surveyDAO /
cfset request.dsn = variables.dsn /

cfreturn true
/cffunction 

and the same error again.

On 07/06/07, George Lu [EMAIL PROTECTED] wrote:

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.

 

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 PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

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 name=OnApplicationStart
cfset Application.surveyDAO =
createObject(component,variables.componentPath 
.components.surveyDAO).init(variables.dsn) /
cfset Application.hrSurveyObj = CreateObject(component,
CFC.DataMgr).init(HR,MSSQL) /
/cffunction

The code causing the error:
cfset Application.surveyDAO.delete(url.userID) /

Please help!

George



 

 

 





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
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 changes have been made to the Application.cfc which is very rare for my
current clients work.



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: 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, obviously if this got in the wrong hands.

 

You can have a totally separate page if you wish, that takes some type of
password.

 

http://www.site.com/appRestart.cfm

 

This could ask for a password and restart the app by calling the Application
methods Andrew used.

 

This way the method of restarting your app doesn't end up in browser caches
etc, at least not the password bit.

 

Regards

Dale Fraser

 

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 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.

 

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 PROTECTED] On Behalf
Of George Lu
Sent: Thursday, 7 June 2007 12:32 PM
To: CFAussie Mailing List
Subject: [cfaussie] Application object

 

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 name=OnApplicationStart
cfset Application.surveyDAO =
createObject(component,variables.componentPath 
.components.surveyDAO).init(variables.dsn) /
cfset Application.hrSurveyObj = CreateObject(component,
CFC.DataMgr).init(HR,MSSQL) /
/cffunction

The code causing the error:
cfset Application.surveyDAO.delete(url.userID) /

Please help!

George

 

 

 



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
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,
CFC.DataMgr).init(HR,MSSQL) /
/cffunction

cffunction name=onRequestStart returnType=boolean
cfargument type=String name=targetPage required=true /

cfif isDefined(url.updateapp)
cfset result = onApplicationEnd() /
cfset result = onApplicationStart() /
/cfif

cfreturn true
/cffunction

If the URL.updateapp exists - it will call onApplicationStart which will
initialise your object for you.

Then you can use Application.surveyDAO anywhere in you application

On 6/7/07, Andrew Scott [EMAIL PROTECTED] wrote:

  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 and how many extra ram is wasted
 by such a method.. Peter might like doing this and wasting valuable
 resources, but it should not be a practice taken upon.



 If you want to email me your application.cfc, I will modify it and get it
 to work for you.



 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 *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 name=targetPage required=true /

 cfif isDefined(url.updateapp)
 cfset result = onApplicationEnd() /
 cfset result = onApplicationStart() /
 /cfif

 cfset request.componentPath = variables.componentPath /
 cfset request.surveyDAO = Application.surveyDAO /
 cfset request.dsn = variables.dsn /

 cfreturn true
 /cffunction

 and the same error again.

 On 07/06/07, *George Lu* [EMAIL PROTECTED] wrote:

 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.



 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 PROTECTED] *On
 Behalf Of *George Lu
 *Sent:* Thursday, 7 June 2007 12:32 PM
 *To:* CFAussie Mailing List
 *Subject:* [cfaussie] Application object



 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 name=OnApplicationStart
 cfset Application.surveyDAO = createObject(component,
 variables.componentPath  .components.surveyDAO).init(variables.dsn) /
 cfset Application.hrSurveyObj = CreateObject(component,
 CFC.DataMgr).init(HR,MSSQL) /
 /cffunction

 The code causing the error:
 cfset Application.surveyDAO.delete(url.userID) /

 Please help!

 George










 



-- 
If you are not living on the edge,
You are taking up too much space.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
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 = createObject(component,
 variables.componentPath  .components.surveyDAO).init(variables.dsn) /
 cfset Application.hrSurveyObj = CreateObject(component,
 CFC.DataMgr).init(HR,MSSQL) /
 /cffunction

 cffunction name=onRequestStart returnType=boolean
 cfargument type=String name=targetPage required=true /

 cfif isDefined(url.updateapp)
 cfset result = onApplicationEnd() /
 cfset result = onApplicationStart() /
 /cfif

 cfreturn true
 /cffunction

 If the URL.updateapp exists - it will call onApplicationStart which will
 initialise your object for you.

 Then you can use Application.surveyDAO anywhere in you application

 On 6/7/07, Andrew Scott [EMAIL PROTECTED] wrote:
 
   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 and how many extra ram is wasted
  by such a method.. Peter might like doing this and wasting valuable
  resources, but it should not be a practice taken upon.
 
 
 
  If you want to email me your application.cfc, I will modify it and get
  it to work for you.
 
 
 
  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 *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 name=targetPage required=true /
 
  cfif isDefined(url.updateapp)
  cfset result = onApplicationEnd() /
  cfset result = onApplicationStart() /
  /cfif
 
  cfset request.componentPath = variables.componentPath /
  cfset request.surveyDAO = Application.surveyDAO /
  cfset request.dsn = variables.dsn /
 
  cfreturn true
  /cffunction
 
  and the same error again.
 
  On 07/06/07, *George Lu* [EMAIL PROTECTED] wrote:
 
  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.
 
 
 
  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 PROTECTED] *On
  Behalf Of *George Lu
  *Sent:* Thursday, 7 June 2007 12:32 PM
  *To:* CFAussie Mailing List
  *Subject:* [cfaussie] Application object
 
 
 
  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 name=OnApplicationStart
  cfset Application.surveyDAO = createObject(component,
  variables.componentPath  .components.surveyDAO).init(variables.dsn)
  /
  cfset Application.hrSurveyObj = CreateObject(component,
  CFC.DataMgr).init(HR,MSSQL) /
  /cffunction
 
  The code causing the error:
  cfset Application.surveyDAO.delete(url.userID) /
 
  Please help!
 
  George
 
 
 
 
 
 
 
 
 
 
 
 


 --
 If you are not living on the edge,
 You are taking up too much space.
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



Application.cfc
Description: application/cfc


[cfaussie] Re: Application object

2007-06-06 Thread George Lu
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 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:

 As per A.S. loose (delete/remove/cut/destroy) these lines in
 onRequestStart

 cfset request.componentPath = variables.componentPath /
 cfset request.surveyGateway = Application.surveyGateway /
 cfset request.surveyDAO = Application.surveyDAO /

 move these to OnApplicationStart
 cfset request.dsn = variables.dsn /
 cfset application.root = /Intranet /
 and change request to application for the dsn
 cfset APPLICATION.dsn = variables.dsn /

 Then in you code, reference
Application.surveyDAO1
Application.hrSurveyObj
APPLICATION.dsn

 So what you end up with is all the APPLICATION wide variables are defined
 as set in OnApplicationStart().

 No need to copy them into the REQUEST scope

 On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
 
  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 = createObject(component,
   variables.componentPath  .components.surveyDAO).init(variables.dsn)
   /
   cfset Application.hrSurveyObj = CreateObject(component,
   CFC.DataMgr).init(HR,MSSQL) /
   /cffunction
  
   cffunction name=onRequestStart returnType=boolean
   cfargument type=String name=targetPage required=true /
  
  
   cfif isDefined(url.updateapp)
   cfset result = onApplicationEnd() /
   cfset result = onApplicationStart() /
   /cfif
  
   cfreturn true
   /cffunction
  
   If the URL.updateapp exists - it will call onApplicationStart which
   will initialise your object for you.
  
   Then you can use Application.surveyDAO anywhere in you application
  
   On 6/7/07, Andrew Scott  [EMAIL PROTECTED] wrote:
   
 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 and how many extra ram is
wasted by such a method.. Peter might like doing this and wasting 
valuable
resources, but it should not be a practice taken upon.
   
   
   
If you want to email me your application.cfc, I will modify it and
get it to work for you.
   
   
   
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 *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 name=targetPage required=true
/
   
cfif isDefined(url.updateapp)
cfset result = onApplicationEnd() /
cfset result = onApplicationStart() /
/cfif
   
cfset request.componentPath = variables.componentPath/
cfset request.surveyDAO = Application.surveyDAO /
cfset request.dsn = variables.dsn /
   
cfreturn true
/cffunction
   
and the same error again.
   
On 07/06/07, *George Lu* [EMAIL PROTECTED] wrote:
   
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.
   
   
   
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 PROTECTED]
*On Behalf Of *George Lu
*Sent:* Thursday, 7 June 2007 12:32 PM
*To:* CFAussie Mailing List
*Subject:* [cfaussie] Application object
   
   
   
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
   
   

[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
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 = createObject(component,
 intranet.hr.survey.components.surveyDAO).init(HR) /
 /cfif

 in the event the object is not initialised.

 On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
 
  As per A.S. loose (delete/remove/cut/destroy) these lines in
  onRequestStart
 
  cfset request.componentPath = variables.componentPath /
  cfset request.surveyGateway = Application.surveyGateway /
  cfset request.surveyDAO = Application.surveyDAO /
 
  move these to OnApplicationStart
  cfset request.dsn = variables.dsn /
  cfset application.root = /Intranet /
  and change request to application for the dsn
  cfset APPLICATION.dsn = variables.dsn /
 
  Then in you code, reference
 Application.surveyDAO1
 Application.hrSurveyObj
 APPLICATION.dsn
 
  So what you end up with is all the APPLICATION wide variables are
  defined as set in OnApplicationStart().
 
  No need to copy them into the REQUEST scope
 
  On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
  
   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 = createObject(component,
variables.componentPath  .components.surveyDAO).init(
variables.dsn) /
cfset Application.hrSurveyObj = CreateObject(component,
CFC.DataMgr).init(HR,MSSQL) /
/cffunction
   
cffunction name=onRequestStart returnType=boolean
cfargument type=String name=targetPage required=true
/
   
cfif isDefined(url.updateapp)
cfset result = onApplicationEnd() /
cfset result = onApplicationStart() /
/cfif
   
cfreturn true
/cffunction
   
If the URL.updateapp exists - it will call onApplicationStart which
will initialise your object for you.
   
Then you can use Application.surveyDAO anywhere in you application
   
On 6/7/07, Andrew Scott  [EMAIL PROTECTED] wrote:

  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 and how many extra ram 
 is
 wasted by such a method.. Peter might like doing this and wasting 
 valuable
 resources, but it should not be a practice taken upon.



 If you want to email me your application.cfc, I will modify it and
 get it to work for you.



 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 *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 name=targetPage
 required=true /

 cfif isDefined(url.updateapp)
 cfset result = onApplicationEnd() /
 cfset result = onApplicationStart() /
 /cfif

 cfset request.componentPath = variables.componentPath/
 cfset request.surveyDAO = Application.surveyDAO /
 cfset request.dsn = variables.dsn /

 cfreturn true
 /cffunction

 and the same error again.

 On 07/06/07, *George Lu* [EMAIL PROTECTED] wrote:

 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.



 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 PROTECTED] *On Behalf Of *George Lu
 *Sent:* Thursday, 7 June 2007 12:32 PM
 *To:* CFAussie Mailing List
 

[cfaussie] Re: Application object

2007-06-06 Thread George Lu
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 [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 = createObject(component,
  intranet.hr.survey.components.surveyDAO).init(HR) /
  /cfif
 
  in the event the object is not initialised.
 
  On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
  
   As per A.S. loose (delete/remove/cut/destroy) these lines in
   onRequestStart
  
   cfset request.componentPath = variables.componentPath /
   cfset request.surveyGateway = Application.surveyGateway/
   cfset request.surveyDAO = Application.surveyDAO /
  
   move these to OnApplicationStart
   cfset request.dsn = variables.dsn /
   cfset application.root = /Intranet /
   and change request to application for the dsn
   cfset APPLICATION.dsn = variables.dsn /
  
   Then in you code, reference
  Application.surveyDAO1
  Application.hrSurveyObj
  APPLICATION.dsn
  
   So what you end up with is all the APPLICATION wide variables are
   defined as set in OnApplicationStart().
  
   No need to copy them into the REQUEST scope
  
   On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
   
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 = createObject(component,
 variables.componentPath  .components.surveyDAO).init(
 variables.dsn) /
 cfset Application.hrSurveyObj =
 CreateObject(component, CFC.DataMgr).init(HR,MSSQL) /
 /cffunction

 cffunction name=onRequestStart returnType=boolean
 cfargument type=String name=targetPage
 required=true /

 cfif isDefined(url.updateapp)
 cfset result = onApplicationEnd() /
 cfset result = onApplicationStart() /
 /cfif

 cfreturn true
 /cffunction

 If the URL.updateapp exists - it will call onApplicationStart
 which will initialise your object for you.

 Then you can use Application.surveyDAO anywhere in you application

 On 6/7/07, Andrew Scott  [EMAIL PROTECTED] wrote:
 
   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 and how many 
  extra ram is
  wasted by such a method.. Peter might like doing this and wasting 
  valuable
  resources, but it should not be a practice taken upon.
 
 
 
  If you want to email me your application.cfc, I will modify it
  and get it to work for you.
 
 
 
  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 *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 name=targetPage
  required=true /
 
  cfif isDefined(url.updateapp)
  cfset result = onApplicationEnd() /
  cfset result = onApplicationStart() /
  /cfif
 
  cfset request.componentPath =
  variables.componentPath /
  cfset request.surveyDAO = Application.surveyDAO /
  cfset request.dsn = variables.dsn /
 
  cfreturn true
  /cffunction
 
  and the same error again.
 
  On 07/06/07, *George Lu* [EMAIL PROTECTED] wrote:
 
  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.
 
 
 
  Dump 

[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
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
problem for you.

 



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 George Lu
Sent: Thursday, 7 June 2007 2:34 PM
To: cfaussie@googlegroups.com
Subject: [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 ()
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 = createObject(component,
intranet.hr.survey.components.surveyDAO).init(HR) /
/cfif

in the event the object is not initialised.

 

On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:

As per A.S. loose (delete/remove/cut/destroy) these lines in onRequestStart

cfset request.componentPath = variables.componentPath /
cfset request.surveyGateway = Application.surveyGateway /
cfset request.surveyDAO = Application.surveyDAO /

move these to OnApplicationStart 
cfset request.dsn = variables.dsn /
cfset application.root = /Intranet /
and change request to application for the dsn
cfset APPLICATION.dsn = variables.dsn /

Then in you code, reference
   Application.surveyDAO1
   Application.hrSurveyObj 
   APPLICATION.dsn

So what you end up with is all the APPLICATION wide variables are defined as
set in OnApplicationStart().

No need to copy them into the REQUEST scope

 

On 6/7/07, George Lu [EMAIL PROTECTED] wrote:

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] mailto:[EMAIL PROTECTED] 
wrote:

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,
CFC.DataMgr).init(HR,MSSQL) / 
/cffunction

cffunction name=onRequestStart returnType=boolean
cfargument type=String name=targetPage required=true / 
   
cfif isDefined(url.updateapp)
cfset result = onApplicationEnd() /
cfset result = onApplicationStart() /
/cfif 

cfreturn true
/cffunction 

If the URL.updateapp exists - it will call onApplicationStart which will
initialise your object for you.

Then you can use Application.surveyDAO anywhere in you application

 

On 6/7/07, Andrew Scott  mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

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 and how many extra ram is wasted
by such a method.. Peter might like doing this and wasting valuable
resources, but it should not be a practice taken upon.

 

If you want to email me your application.cfc, I will modify it and get it to
work for you.



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 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 name=targetPage required=true / 

cfif isDefined(url.updateapp)
cfset result = onApplicationEnd() /
cfset result = onApplicationStart() /
/cfif 

cfset request.componentPath = variables.componentPath /
cfset request.surveyDAO = Application.surveyDAO /
cfset request.dsn = variables.dsn /

cfreturn true
/cffunction 

and the same error again.

On 07/06/07, George Lu [EMAIL PROTECTED] wrote:

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.

 

Dump the Application 

[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
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 updateapp=1 as the old version
will still be there.

On 6/7/07, George Lu [EMAIL PROTECTED] wrote:

 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 [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 = createObject(component,
   intranet.hr.survey.components.surveyDAO).init(HR) /
   /cfif
  
   in the event the object is not initialised.
  
   On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
   
As per A.S. loose (delete/remove/cut/destroy) these lines in
onRequestStart
   
cfset request.componentPath = variables.componentPath/
cfset request.surveyGateway = Application.surveyGateway/
cfset request.surveyDAO = Application.surveyDAO /
   
move these to OnApplicationStart
cfset request.dsn = variables.dsn /
cfset application.root = /Intranet /
and change request to application for the dsn
cfset APPLICATION.dsn = variables.dsn /
   
Then in you code, reference
   Application.surveyDAO1
   Application.hrSurveyObj
   APPLICATION.dsn
   
So what you end up with is all the APPLICATION wide variables are
defined as set in OnApplicationStart().
   
No need to copy them into the REQUEST scope
   
On 6/7/07, George Lu [EMAIL PROTECTED] wrote:

 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 = createObject(component,
  variables.componentPath  .components.surveyDAO).init(
  variables.dsn) /
  cfset Application.hrSurveyObj =
  CreateObject(component, CFC.DataMgr).init(HR,MSSQL) /
  /cffunction
 
  cffunction name=onRequestStart returnType=boolean
  cfargument type=String name=targetPage
  required=true /
 
  cfif isDefined(url.updateapp)
  cfset result = onApplicationEnd() /
  cfset result = onApplicationStart() /
  /cfif
 
  cfreturn true
  /cffunction
 
  If the URL.updateapp exists - it will call onApplicationStart
  which will initialise your object for you.
 
  Then you can use Application.surveyDAO anywhere in you
  application
 
  On 6/7/07, Andrew Scott  [EMAIL PROTECTED] wrote:
  
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 and how many 
   extra ram is
   wasted by such a method.. Peter might like doing this and wasting 
   valuable
   resources, but it should not be a practice taken upon.
  
  
  
   If you want to email me your application.cfc, I will modify it
   and get it to work for you.
  
  
  
   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 *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 name=targetPage
   required=true /
  
   cfif isDefined(url.updateapp)
   cfset result = onApplicationEnd() /
   cfset result = onApplicationStart() /
   /cfif
  
   cfset request.componentPath =
   variables.componentPath /
   cfset request.surveyDAO = Application.surveyDAO/
   cfset request.dsn = variables.dsn /
  
   

[cfaussie] Re: Application object

2007-06-06 Thread George Lu
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
http://mysite/?updateapp=true.

On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:

 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 updateapp=1 as the old version
 will still be there.

 On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
 
  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 [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 = createObject(component,
intranet.hr.survey.components.surveyDAO).init(HR) /
/cfif
   
in the event the object is not initialised.
   
On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:

 As per A.S. loose (delete/remove/cut/destroy) these lines in
 onRequestStart

 cfset request.componentPath = variables.componentPath/
 cfset request.surveyGateway =
 Application.surveyGateway /
 cfset request.surveyDAO = Application.surveyDAO /

 move these to OnApplicationStart
 cfset request.dsn = variables.dsn /
 cfset application.root = /Intranet /
 and change request to application for the dsn
 cfset APPLICATION.dsn = variables.dsn /

 Then in you code, reference
Application.surveyDAO1
Application.hrSurveyObj
APPLICATION.dsn

 So what you end up with is all the APPLICATION wide variables are
 defined as set in OnApplicationStart().

 No need to copy them into the REQUEST scope

 On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
 
  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 =
   createObject(component,variables.componentPath 
   .components.surveyDAO).init(variables.dsn) /
   cfset Application.hrSurveyObj =
   CreateObject(component, CFC.DataMgr).init(HR,MSSQL) /
  
   /cffunction
  
   cffunction name=onRequestStart returnType=boolean
   cfargument type=String name=targetPage
   required=true /
  
   cfif isDefined(url.updateapp)
   cfset result = onApplicationEnd() /
   cfset result = onApplicationStart() /
   /cfif
  
   cfreturn true
   /cffunction
  
   If the URL.updateapp exists - it will call onApplicationStart
   which will initialise your object for you.
  
   Then you can use Application.surveyDAO anywhere in you
   application
  
   On 6/7/07, Andrew Scott  [EMAIL PROTECTED] wrote:
   
 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 and 
how many extra
ram is wasted by such a method.. Peter might like doing this 
and wasting
valuable resources, but it should not be a practice taken upon.
   
   
   
If you want to email me your application.cfc, I will modify
it and get it to work for you.
   
   
   
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 *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 

[cfaussie] Re: Application object

2007-06-06 Thread AJ Mercer
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 
 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
 http://mysite/?updateapp=true.

 On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
 
  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 updateapp=1 as the old version
  will still be there.
 
  On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
  
   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 [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 = createObject(component,
 intranet.hr.survey.components.surveyDAO).init(HR) /
 /cfif

 in the event the object is not initialised.

 On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
 
  As per A.S. loose (delete/remove/cut/destroy) these lines in
  onRequestStart
 
  cfset request.componentPath =
  variables.componentPath /
  cfset request.surveyGateway =
  Application.surveyGateway /
  cfset request.surveyDAO = Application.surveyDAO /
 
  move these to OnApplicationStart
  cfset request.dsn = variables.dsn /
  cfset application.root = /Intranet /
  and change request to application for the dsn
  cfset APPLICATION.dsn = variables.dsn /
 
  Then in you code, reference
 Application.surveyDAO1
 Application.hrSurveyObj
 APPLICATION.dsn
 
  So what you end up with is all the APPLICATION wide variables
  are defined as set in OnApplicationStart().
 
  No need to copy them into the REQUEST scope
 
  On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
  
   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 =
createObject(component,variables.componentPath 
.components.surveyDAO).init(variables.dsn) /
cfset Application.hrSurveyObj =
CreateObject(component, CFC.DataMgr).init(HR,MSSQL)
/
/cffunction
   
cffunction name=onRequestStart returnType=boolean
cfargument type=String name=targetPage
required=true /
   
cfif isDefined(url.updateapp)
cfset result = onApplicationEnd() /
cfset result = onApplicationStart() /
/cfif
   
cfreturn true
/cffunction
   
If the URL.updateapp exists - it will call
onApplicationStart which will initialise your object for you.
   
Then you can use Application.surveyDAO anywhere in you
application
   
On 6/7/07, Andrew Scott  [EMAIL PROTECTED] wrote:

  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 and 
 how many extra
 ram is wasted by such a method.. Peter might like doing this 
 and wasting
 valuable resources, but it should not be a practice taken 
 upon.



 If you want to email me your application.cfc, I will
 modify it and get it to work for you.



 Andrew Scott
 Senior Coldfusion Developer
 Aegeon Pty. Ltd.
 www.aegeon.com.au
 Phone: +613  8676 4223
 Mobile: 0404 998 273




   

[cfaussie] Re: Application object

2007-06-06 Thread Andrew Scott
*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 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.




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] JRun and a war application

2007-06-06 Thread Andrew Scott
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 at installing Roller onto one of these
instances. Now the problem is that the installation instructions I have for
Roller is mainly for tomcat.

 

So the problem that I am stuck with is many, so please bare with me.

 

Problem one, what is the best documentation to read for setting up
applications (war) on an instance of CF under Jrun as the help files and
install notes on CF are a little vague unless I am not reading them right.

 

Another problem or maybe misunderstanding on my part is that the install
docs, talk about the connector config for URI encoding so that I can setup
UTF-8 encoding. I do not want to assume this is a default setting, so need
to make sure that it can accept it, or at least have a setting where I can
set that up for this context.

 

And the last question, when I deploy (already done a quick test) and I am
assuming that I have deployed from the right area in the Jrun management
console. Is that it appears to leave the war files from the location I have
them, is this right or am I missing or done something wrong.

 

Anyway I do have other questions, but those are enough to get me going. Any
help online or offline would be of a great benefit to me.

 

Thanks in advance.

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
 http://www.aegeon.com.au www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Application object

2007-06-06 Thread George Lu
:)

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. 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
  http://mysite/?updateapp=true.
 
  On 07/06/07, AJ Mercer  [EMAIL PROTECTED] wrote:
  
   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 updateapp=1 as the old version
   will still be there.
  
   On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
   
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 [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 = createObject(component,
  intranet.hr.survey.components.surveyDAO).init(HR) /
  /cfif
 
  in the event the object is not initialised.
 
  On 07/06/07, AJ Mercer [EMAIL PROTECTED] wrote:
  
   As per A.S. loose (delete/remove/cut/destroy) these lines in
   onRequestStart
  
   cfset request.componentPath =
   variables.componentPath /
   cfset request.surveyGateway =
   Application.surveyGateway /
   cfset request.surveyDAO = Application.surveyDAO/
  
   move these to OnApplicationStart
   cfset request.dsn = variables.dsn /
   cfset application.root = /Intranet /
   and change request to application for the dsn
   cfset APPLICATION.dsn = variables.dsn /
  
   Then in you code, reference
  Application.surveyDAO1
  Application.hrSurveyObj
  APPLICATION.dsn
  
   So what you end up with is all the APPLICATION wide variables
   are defined as set in OnApplicationStart().
  
   No need to copy them into the REQUEST scope
  
   On 6/7/07, George Lu [EMAIL PROTECTED] wrote:
   
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 =
 createObject(component,variables.componentPath 
 .components.surveyDAO).init(variables.dsn) /
 cfset Application.hrSurveyObj =
 CreateObject(component, CFC.DataMgr).init(HR,MSSQL)
 /
 /cffunction

 cffunction name=onRequestStart returnType=boolean
 cfargument type=String name=targetPage
 required=true /

 cfif isDefined(url.updateapp)
 cfset result = onApplicationEnd() /
 cfset result = onApplicationStart() /
 /cfif

 cfreturn true
 /cffunction

 If the URL.updateapp exists - it will call
 onApplicationStart which will initialise your object for you.

 Then you can use Application.surveyDAO anywhere in you
 application

 On 6/7/07, Andrew Scott  [EMAIL PROTECTED]
 wrote:
 
   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 
  and how many extra
  ram is wasted by such a method.. Peter might like doing 
  this and wasting
  valuable resources, but it should not be a practice taken 
  upon.
 
 
 
  If you want to email me your application.cfc, I will
  modify it and get it to work for you.