@Override
 public void onWisemlLoaded(final WisemlLoadedEvent event) {
   final Setup setup = event.getWiseml().getSetup();
   if (setup != null) {
     view.setTreeViewModel(
         new NodeTreeViewModel(
             testbedConfiguration, setup.getNode(), nodeSelectionModel, nodeGroupSelectionModel));
   }
   view.getLoadingIndicator().hideLoading();
 }
  @Override
  public void onTestbedSelected(final TestbedSelectedEvent event) {
    // TODO Find out why loading indicator is not shown...
    view.getLoadingIndicator().showLoading("Testbed Nodes");

    // Clear tree
    view.setTreeViewModel(
        new NodeTreeViewModel(
            testbedConfiguration,
            new ArrayList<Node>(0),
            nodeSelectionModel,
            nodeGroupSelectionModel));

    this.testbedConfiguration = event.getConfiguration();

    final AsyncCallback<Wiseml> callback =
        new AsyncCallback<Wiseml>() {

          public void onSuccess(final Wiseml result) {
            if (result != null) {
              result.setSetup(DefaultsHelper.apply(result.getSetup()));
            }
            eventBus.fireEvent(new WisemlLoadedEvent(result));
          }

          public void onFailure(final Throwable caught) {
            view.getLoadingIndicator().hideLoading();
            eventBus.fireEvent(new ThrowableEvent(caught));
          }
        };
    final String url = testbedConfiguration.getSessionmanagementEndpointUrl().trim();
    Scheduler.get()
        .scheduleDeferred(
            new Scheduler.ScheduledCommand() {

              public void execute() {
                service.getWiseml(url, callback);
              }
            });
  }
 @Override
 public void onThrowable(final ThrowableEvent event) {
   view.getLoadingIndicator().hideLoading();
   if (event.getThrowable() == null) return;
   if (testbedConfiguration != null && testbedConfiguration.getName() != null) {
     MessageBox.error(
         "Error fetching testbed data for testbed '" + testbedConfiguration.getName() + "'!",
         event.getThrowable().getMessage(),
         event.getThrowable(),
         null);
   } else {
     MessageBox.error(
         "Error fetching testbed data!",
         event.getThrowable().getMessage(),
         event.getThrowable(),
         null);
   }
 }
 @Override
 public void onPlaceChange(final PlaceChangeEvent event) {
   view.getLoadingIndicator().hideLoading();
   eventBus.removeAll();
 }