GWT.以编程方式在ListBox上Fire ChangeEvent.

MyT*_*tle 17 java gwt

我想以编程方式触发ListBox ChangeEvent.我找到了函数,但是不知道我需要传递什么类型的参数:

DomEvent.fireNativeEvent(NativeEvent - where???, listBox());
Run Code Online (Sandbox Code Playgroud)

Str*_*lok 30

您可以使用以下命令在窗口小部件上触发本机ChangeEvent:

DomEvent.fireNativeEvent(Document.get().createChangeEvent(), yourListBox);
Run Code Online (Sandbox Code Playgroud)

  • Saeed Zarinfam:将项目设置为forst,然后使用Strelok的建议解雇事件. (2认同)