@Override
public void onSelectionChange(SelectionChangeEvent event) {
serverProvider.setList(Collections.EMPTY_LIST);
Host selectedHost = getSelectedHost();
Console.MODULES.getEventBus().fireEvent(
new GlobalHostSelection(selectedHost.getName())
);
if(selectedHost!=null)
{
presenter.loadServer(selectedHost.getName());
}
}
});
serverList.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
ServerInstance server = getSelectedServer();
Host selectedHost = getSelectedHost();
if(selectedHost!=null &server!=null)
{
presenter.onServerSelected(selectedHost, server);
updateDisplay();