I guess that's what I get for not RTFM'ing... thanks Calvin.
Unfortunately... this still doesn't seem to work:
<cfcomponent>
<cffunction name="onRequest">
<cfargument name="targetPage" type="string" required="true">
<cfinclude template="Application.cfm">
<cfinclude template="#targetPage#">
</cffunction>
<cffunction name="onApplicationStart">
<cfinclude template="Application.cfm">
<cfset application.siteFactory =
createObject("component","site.cfc.siteFactory")>
</cffunction>
</cfcomponent>
With this structure it appears to error out during the
Application.cfm, although I can't decypher the stack trace enough to
determine if that's happening during the onApplicationStart or the
onRequest... and I can't take it out of either place as a result of
previous architectural decisions.
> I think you can use the OnRequest method (be sure to read
> up on it) and
> anything declared there will be fine as local variables
> just like
> Application.cfm.
> - Calvin
> -----Original Message-----
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 02, 2005 1:44 PM
> To: CF-Talk
> Subject: fix for moving legacy code to application.cfc w/
> local variables
> I'm betting the answer to this is no, but has anyone found
> a way of
> migrating an existing application.cfm to the
> onRequestStart portion of an
> Application.cfc while maintaining the viability of local
> variables that had
> been set in the Application.cfm? I know it's a bad
> practice
> -- wasn't my idea. :) I was just kinda hoping (likely
> futile) that there
> might be a workaround to allow us to use application.cfc
> in spite of the bad
> practice.
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208432
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54