Title:
Method invocation through ajaxproxy fails even if the required arguments are passed .
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): / ()
Created: 05/04/2017
Versions: 2016
Failure Type: Incorrectly functioning
Found In Build/Fixed In Build: 302561 / Verified in the patch provided.
Priority/Frequency: Major / Some users will encounter
Locale/System: /
Vote Count: 2
Problem: Method invocation through ajaxproxy fails even if the required arguments are
passed .
Method: copy and paste the below code in a cfm file
<script type="text/javascript">
function foobar(fname, lname){
//alert(fname + ", " + lname);
t1 = new temp();
t1.setForm('form2');
//t1.setCallbackHandler();
t1.setHTTPMethod('POST');
t1.testAjax(fname, lname);
}
</script>
<cfset fname="S">
<cfset lname="K">
<cfform format="html">
<cfinput type="textbox" name="firstName" value="#fname#"/>
<cfinput type="textbox" name="lastName" value="#lname#"/>
<cfinput type="button" name="test" onClick="foobar('#fname#','#lname#');"/>
<cfajaxproxy cfc="test" jsclassname="temp"/>
Copy and paste the below code in a cfc and name it as test.cfc
<cfcomponent >
<cffunction name="testAjax" access="remote">
<cfargument type="string" name="arg1" required="true">
<cfargument type="string" name="arg2" required="true">
<cfdump var="#arguments#" format='text' output="c:\testAjax.txt">
<cfreturn "hello!">
</cffunction>
</cfcomponent>
Even if the required arguments are passed it throws argument error
Result:coldfusion.runtime.MissingArgumentException: The ARG1 parameter to the testAjax function is required but was not passed in.
Expected: method should be invoked without any errors.
Workaround:
Note:
Attachments:
- May 23, 2017 00:00:00: hf201600-0000000.jar
Comments: