private void loadStocks() { stockService.getStocks( new AsyncCallback<String[]>() { public void onFailure(Throwable error) { handleError(error); } public void onSuccess(String[] symbols) { displayStocks(symbols); } }); }
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); } }); }