Пример #1
0
  @Override
  public void delete() {
    service.remove(
        pair,
        new AsyncCallback<Void>() {
          @Override
          public void onFailure(Throwable caught) {
            bus.fireEvent(new ServerFailureNotifyEvent(caught));
          }

          @Override
          public void onSuccess(Void result) {
            bus.fireEvent(
                new NotifyEvent(
                    new Message(
                        Level.INFO,
                        "Exchange rate deleted",
                        "The exchange rate has been permanently removed.")));
            bus.fireEvent(new CurrencyPairModified(pair));
          }
        });
  }