コード例 #1
0
  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();
          }
        });
  }
コード例 #2
0
 @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);
           }
         });
   }
 }
コード例 #3
0
  @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));
    }
  }