View comments | RSS feed

cfinvokeargument

Description

Passes the name and value of a parameter to a component method or a web service. This tag is used within the cfinvoke tag.

Category

Extensibility tags

Syntax

<cfinvokeargument
  name="argument name"
  value="argument value">

See also

cfargument, cfcomponent, cffunction, cfinvoke, cfobject, cfproperty, cfreturn

History

New in ColdFusion MX: This tag is new.

Attributes

Attribute Req/Opt Default Description
name
Required

Argument name
value
Required

Argument value

Usage

You can code multiple name/value pairs within this tag.

Example 1

<cfinvoke 
  component="nasdaq.quote" 
  method="getLastTradePrice"
  returnVariable="res">
  <cfinvokeargument 
    name="symbol" value="mot">
  <cfinvokeargument 
    name="symbol"   value="macr">
</cfinvoke>

<cfoutput>#res#</cfoutput>

Example 2

<cfinvoke
  webservice ="http://www.xmethods.net/sd/2001/BabelFishService.wsdl"
  method ="BabelFish"
  returnVariable = "varName"
  >
  <cfinvokeargument 
    name="translationmode" value="en_es">
  <cfinvokeargument 
    name="sourcedata" value="Hello world, friend">
</cfinvoke>
<cfoutput>#varName#</cfoutput>  

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6

Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.

Comments


halh said on Jul 21, 2002 at 11:08 PM :
To the object being called, using <cfinvokeargument name="myName" value="Hal"> is the same as <cfinvoke component="myCFC" method="doThis" myName="Hal"> You can use either one. The advantage to the <cfinvokeargument> tag is that you can apply conditional code to determine what arguments to pass.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt164.htm