@SuppressWarnings("unchecked")
@Override
protected void onSubmit() {
TextField<String> tf = (TextField<String>) get(Constants.TEST_CLASS_NAME_ID);
String targetClassStr = (String) tf.getDefaultModelObject();
MistletoeCore mCore = null;
try {
mCore = new MistletoeCore(targetClassStr);
} catch (ClassNotFoundException e) {
error("Failed to find class " + targetClassStr);
return;
}
TestReport rootReport = mCore.run();
rootReport = TestReport.getFistChildIfNecessary(rootReport);
TestReportPanel nodePanel = new TestReportPanel(Constants.NODE_ID,
rootReport);
parent.remove(Constants.NODE_ID);
parent.add(nodePanel);