我想test()
从 JSNI 变量中调用 Java 方法successHandler()
。但是,我收到错误
[ERROR] - Line 110: Missing qualifier on instance method 'com.gw.myProject.client.presenter.payments.PaymentProgramPresenter.test'
原始代码:
public static native void purchase(String token) /*-{
var successHandler = function(status){ // Success handler
return @com.gw.myProject.client.presenter.payments.PaymentProgramPresenter::test()();
}
var failureHandler = function(status){ // Failure handler
// $wnd.alert('testing');
}
$doc.purchaseAction(token, successHandler, failureHandler);
}-*/;
public void test() {
this.onHide();
}