<cfcomponent>
<cffunction name="onRequest">
<cfargument name="targetPage">
<cfset variables.sayHi = this.sayHi>
<cfinclude template="#targetPage#">
</cffunction>
<cffunction name="sayHi">
<cfreturn "Hi">
</cffunction>
</cfcomponent>
In your file:
<cfoutput>#sayHi()#</cfoutput>
This only works because we're including the target page, which will
then be using the same variables scope we just injected the function
into. Because onRequest (as opposed to onRequestStart) replaces the
original request, it's standard practice to include the target page
in the body of the onRequest function.
Robin
______________
Robin Hilliard
Director - RocketBoots Pty Ltd
Consulting . Software Licensing . Recruitment . Training
http://www.rocketboots.com.au
For schedule/availability call Pamela Higgins:
w +61 7 5451 0362
m +61 419 677 151
f +61 3 9923 6261
e [EMAIL PROTECTED]
or Direct:
m +61 418 414 341
e [EMAIL PROTECTED]
*** Worldwide Adobe Licensing - Volume discounts now start at one
point ***
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---