public void onSuccess(JSONValue result) {
JSONArray data = result.isArray();
String title = series + " for " + param;
FlexTable contents = new FlexTable();
final SimpleDialog drill = new SimpleDialog(title, contents);
for (int i = 0; i < data.size(); i++) {
final JSONArray row = data.get(i).isArray();
final int testId = (int) row.get(0).isNumber().doubleValue();
String yValue = Utils.jsonToString(row.get(1));
Anchor link = new Anchor(yValue);
link.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
drill.hide();
listener.onSelectTest(testId);
}
});
contents.setWidget(i, 0, link);
}
drill.center();
}
});
}