Return to Snippet

Revision: 27980
at June 29, 2010 00:35 by ChrisCantley


Initial Code
-- Instantiating at a variable level
<Cfset application.cfc.image = createObject("component", "#application.RPUBcfcpath#.image") />

-- Then call
<cfoutput>
#application.cfc.string.titleCase([argumentParam1], [argumentParam2])#
</cfoutput>


------------------------------------------

-- Invoke the Application instantiated arguemnt using CFINVOKE
<cfinvoke
    component="#application.cfc.getData#"
    method="getMODSimilarModelno"
    returnvariable="similarToMOD">
    
  <cfinvokeargument
      name="modelno"
      value="#url.modelno#">
      
</cfinvoke>

------------------------------------------

-- Invoke the component directly
<cfinvoke
    component="nasdaq.quote"
    method="getLastTradePrice"
    returnVariable="res">
    
    <cfinvokeargument
        name="symbol"
        value="macr">
        
</cfinvoke>

Initial URL

                                

Initial Description

                                

Initial Title
How To instantiate a CFC

Initial Tags

                                

Initial Language
ColdFusion