var callback = dojo.lang.hitch(this, this.getCallbackReview); //This is used to call callback funstion after line2
this.service.ReviewManager.getReview(callback, path, ItemPath, true); //use to call java method which returns Pojo
//This is callback function
getCallbackReview: function(info, error) {
if(error) {
alert(error); //in case of any error from the java method
return;
}
alert(info); //If no error thrown from Java Method
},
第二个不是抛出任何错误并返回正确的信息,但如果此信息有clob
字段,那么我将错误视为未定义。
答案 0 :(得分:0)
在这行代码中:
var callback = dojo.lang.hitch(this, this.getCallbackReview);
您传递范围this.getCallbackReview
,但此属性未在您的代码段中定义。
要解决此问题,您应该考虑将getCallbackReview
添加为属性
this.getCallbackReview = function(info, error) {
...
},
或者altlly:
var callback = dojo.lang.hitch(this, getCallbackReview);