Having trouble passing a JavaScript Object to the server side using a DWR method call and encountering a JS error.
Here is the JavaScript code:
var referenceFieldValues = new Object();
var refFieldArray = referenceFields.split(",");
for(var i=0;i<refFieldArray.length;i++ ){
referenceFieldValues[refFieldArray[i]] = $("#"+refFieldArray[i]).val();
}
DWRRequesthandler.method(fieldId,refObjectId,searchField,searchText,referenceFieldValues,callback);
And the corresponding Java Code :
public JSONObject method(String fieldId, String refObjectId,String searchField, String searchString, Object referenceFieldValues,HttpServletRequest request,HttpServletResponse response){
//some code..
}
The request fails to reach the server and DWR throws an error. The populated value of referenceFieldValues is shown as:
Object { AB_SUP_COM="12345"}
Any assistance would be greatly appreciated.