我有点困惑,试图了解如何在 UiBinder 中捕获 SuggestionBox onchange() 事件。
任何帮助是极大的赞赏。以下代码不起作用:
@UiHandler( "singleRuleTemplateLeftSuggestBox" )
void onChangeLeftOperand( ChangeEvent e ) {
for ( OperatorProxy operator : operatorValues ) {
operatorSuggestions.add( operator.getOperatorName() );
}
}
另一种尝试:
singleRuleTemplateLeftSuggestBox.getValueBox().addChangeHandler( new ChangeHandler() {
@Override
public void onChange( ChangeEvent event ) {
System.out.println( singleRuleTemplateLeftSuggestBox.getValue() );
}
} );