我想从vaadin 6.8.9中的组合框中删除一个焦点侦听器。以下是我的焦点侦听器代码
tbCmbProductName.get(ar).addListener(new FocusListener(){
public void focus(FocusEvent event){
//do something
}
});我该怎么做呢,请帮帮忙...
发布于 2016-02-25 16:29:35
保留对FocusListener的引用,然后使用相同的参数调用removeListener。
像这样的东西
final FocusListener focusListener = new FocusListener(){
public void focus(FocusEvent event){
//do something
}
};
// To add
tbCmbProductName.get(ar).addListener(focusListener);
// to remove
tbCmbProductName.get(ar).removeListener(focusListener);https://stackoverflow.com/questions/35621240
复制相似问题