serverProvider.addDataDisplay(serverList);
hostList.getSelectionModel().addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
Host selectedHost = getSelectedHost();
if(selectedHost!=null)
{
if(!preventRefreshServerList)
presenter.loadServer(selectedHost.getName());
}
else if(selectedHost==null)
{
serverProvider.setList(Collections.EMPTY_LIST);
}
}
});
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();