tracker issue : CF-3863516

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] Doc Bug for: cfinvoke() and cfinvokeargument() _are_ supported

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 12/07/2014

Components: Documentation

Versions: 11.0

Failure Type: Unspecified

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Trivial / Some users will encounter

Locale/System: ALL / Platforms All

Vote Count: 0

Currently, the cfscript doc says:

The script support is not available for the following tags:

<cfscript>
<cfoutput> (use writeOutput() instead)
<cfdump> (use writeDump() instead)
<cfinvoke> (use invoke() instead)
<cfinvokeargument>
<cfobject> (use createObject instead)

However, <cfinvoke> and <cfinvokeargument> should be removed from that list b/c they are supported in CF11 Final (11,0,0,289822).  Repro:

MyCFC.cfc
---------
component {function myFunction() {return ARGUMENTS;}}

index.cfm
---------
<cfscript>
  cfinvoke(component="MyCFC", method="myFunction", returnvariable="myResult") {
    if(true) {
    	cfinvokeargument(name="myArgument", value="my value");
    }
  }
  writeDump(myResult);
</cfscript>

Returns {myArgument="my value"}

Thanks, BTW, for getting this into the final build.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3863516

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comments:

Related URL: https://wikidocs.adobe.com/wiki/display/coldfusionen/cfscript#cfscript-Scriptsupportfortags
Comment by External U.
9660 | December 07, 2014 03:36:33 PM GMT
I've updated the doc. This ticket can be marked Closed/Fixed. Thanks!, -Aaron
Comment by External U.
9661 | December 07, 2014 04:08:40 PM GMT
Though cfinvoke() and cfinvokearguments() work, they are not supported and we clearly want you to use invoke(). We have reverted back the doc changes you had made as that was kept there intentionally.
Comment by Rupesh K.
9662 | December 08, 2014 06:32:41 AM GMT
Hi Rupesh, Could cfinvoke()/cfinvokeargument() please be supported since <cfinvokeargument> has no script-equivalent? Syntax 1: <cfscript> temp = {arg1="a1",arg2="a2"}; if(condition) { temp.arg3="a3"; } r = invoke("c", "f", temp); </cfscript> Syntax 2: <cfscript> cfinvoke(component="c", method="f", returnvariable="r", arg1="a1", arg2="a2") { if(condition) { cfinvokeargument(name="arg3", value="a3"); } } </cfscript> I like Syntax 2 b/c I don't have to create a temp variable. Could you please consider? Thanks, -Aaron
Comment by External U.
9663 | December 08, 2014 08:13:08 AM GMT
cfinvokeargument does not need a script equivalent. you pass the variable directly in the "invoke" method and you have the complete control of creating the variable that you want to pass.
Comment by Rupesh K.
9664 | December 08, 2014 08:40:54 AM GMT
my point was that the variable is unnecessary
Comment by External U.
9665 | December 08, 2014 08:49:36 AM GMT
Hi Rupesh, <cfinvokeargument omit=""> doesn't have a script equivalent. I've filed that as #CF-3864383. Could you please restore my cfinvoke()/cfinvokeargument() doc edit and change this ticket #CF-3863516 from Closed/Withdrawn/NotABug to Closed/Fixed? Thanks!, -Aaron
Comment by External U.
9666 | December 08, 2014 06:52:01 PM GMT