Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/395.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从Javascript以编程方式调用EditTextCell的onBrowserEvent()?_Javascript_Java_Gwt_Dom Events - Fatal编程技术网

如何从Javascript以编程方式调用EditTextCell的onBrowserEvent()?

如何从Javascript以编程方式调用EditTextCell的onBrowserEvent()?,javascript,java,gwt,dom-events,Javascript,Java,Gwt,Dom Events,如何从Javascript以编程方式调用EditTextCell的onBrowserEvent? 我在customEditTextCell中重写onBrowserEvent,当用户单击单元格时调用它。我还想打其他活动的电话 public void onBrowserEvent(Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdat

如何从Javascript以编程方式调用EditTextCell的onBrowserEvent?

我在customEditTextCell中重写onBrowserEvent,当用户单击单元格时调用它。我还想打其他活动的电话

public void onBrowserEvent(Context context, Element parent, String value,
        NativeEvent event, ValueUpdater<String> valueUpdater) { 
     // my custom code is here
   }

任何相同的示例代码或正确执行该操作的指针

我都会使用另一个保存该方法上下文的匿名对象。大概是这样的:

private Runnable contextCall;

public void onBrowserEvent(final Context context, final Element parent, final String value,
        final NativeEvent event, final ValueUpdater<String> valueUpdater) { 
    contextCall = new Runnable() {
        public void run() {
            // my custom code is here
        }
    };

    contextCall.run();
}

public void callOnBrowserEventForDateTimePicker() {
    contextCall.run();
}
私有可运行上下文调用;
public void onBrowserEvent(最终上下文、最终元素父级、最终字符串值、,
final NativeEvent事件,final ValueUpdater ValueUpdater){
contextCall=new Runnable(){
公开募捐{
//我的自定义代码在这里
}
};
contextCall.run();
}
public void callOnBrowserEventForDateTimePicker(){
contextCall.run();
}

那么基本上您想再次调用相同的方法,使用jquery代码中的相同参数?或者我不明白你的问题。@bogdan.mustiata是的,我想再次调用相同的方法,使用jquery代码中的相同参数。上下文相同
private Runnable contextCall;

public void onBrowserEvent(final Context context, final Element parent, final String value,
        final NativeEvent event, final ValueUpdater<String> valueUpdater) { 
    contextCall = new Runnable() {
        public void run() {
            // my custom code is here
        }
    };

    contextCall.run();
}

public void callOnBrowserEventForDateTimePicker() {
    contextCall.run();
}