Example #1
0
  private void loadStocks() {
    stockService.getStocks(
        new AsyncCallback<String[]>() {
          public void onFailure(Throwable error) {
            handleError(error);
          }

          public void onSuccess(String[] symbols) {
            displayStocks(symbols);
          }
        });
  }
Example #2
0
  private void removeStock(final String symbol) {
    stockService.removeStock(
        symbol,
        new AsyncCallback<Void>() {
          public void onFailure(Throwable error) {
            handleError(error);
          }

          public void onSuccess(Void ignore) {
            undisplayStock(symbol);
          }
        });
  }