Re: Problems with switching from application.cfm to application.c fc

2008-07-22 Thread gary gilbert
Richard,

You may want to check out the documentation on application.cfc before going any 
further...

Gary 

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

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


RE: Problems with switching from application.cfm to application.c fc

2008-07-21 Thread Dave Watts
 However, in our current application.cfm file we had defined 
 20 or so variables that were not scoped (eg. 
 xcachepath=/cache. In application.cfc, these variables 
 evidently need to be scoped  (eg. 
 request.xcachepath=/cache. This is a huge website and the 
 thought of searching and replacing these variables and then 
 uploading each one of thousands of files to our production 
 server is daunting and could take many days of work.

You can automate the search and replace of those variables, obviously.

Alternatively, you could place the variables in the local page scope by
adding an onRequest event handler:

cffunction name=onRequest ...
cfargument name=targetPage
cfset xcachepath = /cache
...
cfinclude template=#Arguments.targetPage#
...
/cffunction

Of course, if you do this, you would break any CFC URLs that involve web
services or Flash remoting. But on the other hand, you could go back and add
equivalent Request-scoped variables at your leisure, then remove this when
you're done.

 If there is no work around to the above problem, can the 
 missing template handler be used in the application.cfm? 

There's a missing template handler setting in the CF Administrator. Other
than that, no.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

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

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


Re: Problems with switching from application.cfm to application.c fc

2008-07-21 Thread Richard Steele
I like your idea:

cffunction name=onRequest ...
cfargument name=targetPage
cfset xcachepath = /cache
...
cfinclude template=#Arguments.targetPage#
...
/cffunction


However I'm not sure how to implement this. What is the targetpage? Since this 
is the root application.cfc there are many different index pages that this 
application.cfc will use. 

Here's a another example of my stripped down cfc:
cfcomponent

cffunction name=onRequestStart returnType=boolean output=false

CFAPPLICATION NAME=mywebsite SESSIONMANAGEMENT=Yes 
sessiontimeout=#CreateTimeSpan(0,0,20,0)# setclientcookies=yes 



CFSET xServerPath = 
c:\inetpub\wwwroot\clients\mywebsite\html
cfset application.googlekey 
=ABQIGLygu72xTxPUIqNs3HgaixRGoefddpfKqX6LEQeDUC4B8xTs1enEDprVOV5TidrQOUmVZpW7QA


cfsetting showdebugoutput=no

CFSET DATASOURCE = mywebsitecom
CFSET COMPANYNAME = mywebsite

 cfset xSSLUrl = https://www.mywebsite.com; 



cfset xSwitch=1

cfif xSwitch is 1
cfset xPathOrdering =#xSSLUrl#/templates/ 
cfset xURLPath =#xSSLUrl#/
  CFSET xURLHome = #application.XNEWROOT# 

cfelse
cfset xPathOrdering = 
cfset xURLPath = http://localhost/mywebsite/;
/cfif

cfset application.xtimedifference=2 

cfset simple = 1
cfset xbird=robin
cfset application.xbird=robin

cfinclude template=templates/codecopyright.cfm

CFSET xLiveInventory = StockWeb

cfset xCfhttpPath=#application.XNEWROOT#

cfset xRelativePath = 
c:\inetpub\wwwroot\clients\Xservercom\html

CFSET xCache = 
c:\inetpub\wwwroot\clients\mywebsitecom\html\_cache

CFSET xRootCache = /_cache

cfif xSwitch is 0
cfset aSiteURL=http://localhost/mywebsite;
cfelse
cfset aSiteURL=#application.XNEWROOT#

/cfif

]
CFSET aShowAuctions = 1

!--- Used to determine a light grey image border color ---
CFSET aBorderColor = Silver

!--- Added 8/19/07 For Amazon Rest Statements ---
cfset amz_Service =AWSECommerceService
cfset amz_AWSAccessKeyId = 1FDX21XKHQ9CAT4X02
cfset amz_Version = 2007-07-16
cfset amz_associateid = xcom-20


cfreturn true
/cffunction

/cfcomponent 

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

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