}
/** Initializes the Presenter and View for the testcases page. */
private TaPagePresenter createTestcasesPage() {
final Label emptyLabel = new Label();
final ProjectDataViewImpl dataView = new ProjectDataViewImpl();
dataView.setPageText(
"Project Testcases",
"The following testcases have been uploaded to your Test Analytics project.");
Function<Void, Void> onRefreshPage =
new Function<Void, Void>() {
@Override
public Void apply(Void input) {
dataService.getProjectTestCasesById(getProject().getProjectId(),
new TaCallback<List<TestCase>>("querying project testcases") {
@Override
public void onSuccess(List<TestCase> results) {
List<UploadedDatum> converted = Lists.newArrayList();
for (TestCase item : results) {
converted.add(item);
}
dataView.displayData(converted);
}
});
return null;
}
};