public void launchNewConfigDialoge() {

    window = new DefaultWindow("Create Server Configuration");
    window.setWidth(480);
    window.setHeight(360);
    window.addCloseHandler(
        new CloseHandler<PopupPanel>() {
          @Override
          public void onClose(CloseEvent<PopupPanel> event) {
            /*if(selectedRecord==null)
            History.back();*/
          }
        });

    serverGroupStore.loadServerGroups(
        new SimpleCallback<List<ServerGroupRecord>>() {
          @Override
          public void onSuccess(List<ServerGroupRecord> result) {
            serverGroups = result;
            window.setWidget(
                new NewServerConfigWizard(ServerConfigPresenter.this, serverGroups).asWidget());

            window.setGlassEnabled(true);
            window.center();
          }
        });
  }
 @Override
 public void onStaleModel(String modelName) {
   if (StaleModelEvent.SERVER_GROUPS.equals(modelName)) {
     serverGroupStore.loadServerGroups(
         new SimpleCallback<List<ServerGroupRecord>>() {
           @Override
           public void onSuccess(List<ServerGroupRecord> result) {
             getView().updateServerGroups(result);
           }
         });
   }
 }
  private void loadSocketBindings() {
    serverGroupStore.loadSocketBindingGroupNames(
        new SimpleCallback<List<String>>() {
          @Override
          public void onSuccess(List<String> result) {
            getView().updateSocketBindings(result);

            // step2
            loadServerConfigurations();
          }
        });
  }
  @Override
  protected void onReveal() {
    super.onReveal();

    PlaceRequest currentPlaceRequest = placeManager.getCurrentPlaceRequest();
    if (!hasBeenRevealed
        && NameTokens.ServerGroupMgmtPresenter.equals(currentPlaceRequest.getNameToken())) {
      hasBeenRevealed = true;

      // update LHS
      serverGroupStore.loadServerGroups(
          new SimpleCallback<List<ServerGroupRecord>>() {
            @Override
            public void onSuccess(List<ServerGroupRecord> result) {
              getView().updateServerGroups(result);
            }
          });

      // forward default to ServerGroupPresenter, this presenter doesn't have a default view
      placeManager.revealRelativePlace(new PlaceRequest(NameTokens.ServerGroupPresenter));
    }
  }
  private void loadSubsystems(ServerInstance server) {
    if (!server.getName().equals(previousServerSelection)) {
      previousServerSelection = server.getName();

      // load subsystems for selected server

      serverGroupStore.loadServerGroup(
          server.getGroup(),
          new SimpleCallback<ServerGroupRecord>() {
            @Override
            public void onSuccess(ServerGroupRecord group) {
              subsysStore.loadSubsystems(
                  group.getProfileName(),
                  new SimpleCallback<List<SubsystemRecord>>() {
                    @Override
                    public void onSuccess(List<SubsystemRecord> result) {
                      getView().setSubsystems(result);

                      Scheduler.get()
                          .scheduleDeferred(
                              new Scheduler.ScheduledCommand() {
                                @Override
                                public void execute() {
                                  Console.MODULES
                                      .getEventBus()
                                      .fireEvent(
                                          new LHSHighlightEvent(
                                              placeManager
                                                  .getCurrentPlaceRequest()
                                                  .getNameToken()));
                                }
                              });
                    }
                  });
            }
          });
    }
  }