I'm trying to learn and utilize the new concepts inherent in Application CFC.

I wanted to add a UDF to my application by having it automatically included in 
by the CFC.  It took me a couple of try to figure out how to do this, since one 
can not define an UDF <cfFunction> inside a CFC Method <cfFunction> block.

Anyway, while working through this problem, I tried implementing an onRequest 
Method.  But I could not get it to work.  The documentation says you must 
explicitly call the target page by using a <cfinclude> tag.  But when I did 
this, I received the error that one can not call a template by <cfinclude> with 
a relative path.  So how am I supposed to do this?  

I looked to the example in the documentation. I tried to use it.  And I 
received the same relative path error.

<cffunction name="onRequest">
  <cfargument name="targetPage" type="String" required=true/>
  <cfset var content="">
  <cfsavecontent variable="content">
    <cfinclude template="#Arguments.targetPage#">
  </cfsavecontent>
  <cfoutput>
    #replace(content, "report", "MyCompany Quarterly Report", "all")#
  </cfoutput>
</cffunction>

TIA for any insights in how to properly use the Applciation.CFC.

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

---------
| 1 |   |
---------  Binary Soduko
|   |   |
---------
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242630
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

Reply via email to