当通过cfajaxproxy从javascript调用时,cfc函数不接收参数

Ste*_*aji 7 javascript parameters ajax coldfusion

我在安装ColdFusion 2016 Update 4时遇到了这个问题.

HTML:

<input type='button' name='btn' value='Click me' onclick='proxyFunc();'>
Run Code Online (Sandbox Code Playgroud)

代理:

<cfajaxproxy cfc='proxy' jsClassName="jsProxyClass" >
Run Code Online (Sandbox Code Playgroud)

使用Javascript:

proxyFunc = function () {
  var proxyObj = new jsProxyClass();
  proxyObj.setHTTPMethod("post");   
  proxyObj.setCallbackHandler (function (result) {
      console.log(result);
  });
  proxyObj.func('X');
}
Run Code Online (Sandbox Code Playgroud)

CFC:

<cffunction name='func' access='remote' returntype='string' >
  <cfargument name='arg' type='string' required='false' >

  <cfreturn 'What is my arg? ' & arguments.arg>
</cffunction>
Run Code Online (Sandbox Code Playgroud)

我在cfc中设置了断点,发现arguments.arg为空,我有form.argumentcollection = {"arg":"X"}

如果我将setHTTPMethod从"post"更改为"get",arguments.arg ="X",正如我所料.

我有很多代码在这次CF更新之前一直工作正常,现在它全部破了:(

任何帮助,将不胜感激.提前致谢.

Ste*_*aji 4

我发现 Adob​​e 发布的这个补丁https://tracker.adobe.com/#/view/cf-4198589,它对我有用。