private void showTransHistory(final String username, final String displayName) { AsyncCallback<DealLog[]> callback = new AsyncCallback<DealLog[]>() { public void onFailure(Throwable caught) { // TODO: Do something with errors. GWT.log(caught.toString()); } public void onSuccess(DealLog[] logs) { if (logs == null) { Window.alert(MockStock.SESSION_TIMEOUT_MSG); return; } removeGrids(); createTransTable(logs); transUser = new Label("\"" + displayName + "\"交易记录如下:"); getItself().add(transUser); getItself().add(transGrid); } }; // Make the call to the stock price service. stockSvc.getDealLogs(username, callback); }