ComboBox
にバインドされ、正常に動作していると呼ばれるGXTがListStore
ありaddSelectionHandler
ます。私も使用しましたcombo.setEmptyText("Select an item..")
。
ComboBox
しかし、ユーザーが選択を行うと、 「選択なし」の状態に戻りたいと思います。「アイテムを選択してください..」を表示するためにどのように戻すことができますか?
StProperties props = GWT.create(StProperties.class);
ListStore<St> sts = new ListStore<St>(combo.id());
combo = new ComboBox<St>(sts, props.name());
combo.setTypeAhead(true);
combo.setTriggerAction(TriggerAction.ALL);
addHandlersForEventObservation(combo,props.name());
...
combo.addSelectionHandler(new SelectionHandler<T>() {
public void onSelection(SelectionEvent<T> event) {
System.out.println("value selected:"+event.getSelectedItem());
// handle selection
// unselect item in combo here ---
}
});