Reputation: 21
Is there any way to populate table viewer on combo box value selection using SWT/Jface databinding?
Upvotes: 0
Views: 745
Reputation: 381
You will not use JFace databinding with this solution but I hope you will find what you want :
Use a ComboViewer
with your TableViewer
and do something like :
comboViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
tableViewer.setInput(event.getSelection());
tableViewer.refresh();
}
});
Upvotes: 1