return f;
}
+ /**
+ * Override this method to return correct version number of your
+ * Application. Version information is delivered for example to Testing
+ * Tools test results.
+ *
+ * @return version string
+ */
+ public String getVersion() {
+ return "NONVERSIONED";
+ }
+
}
\ No newline at end of file
private native static void initializeTestingTools(String testServerUri,
ApplicationConnection ap)
/*-{
- $wnd.itmill.gwtClient = {};
- $wnd.itmill.gwtClient.hasActiveRequest = function() {
- return ap.@com.itmill.toolkit.terminal.gwt.client.ApplicationConnection::hasActiveRequest()();
- }
- $wnd.itmill.startTT(testServerUri);
+ var client = {};
+ client.hasActiveRequest = function() {
+ return ap.@com.itmill.toolkit.terminal.gwt.client.ApplicationConnection::hasActiveRequest()();
+ }
+ client.getVersionInfo = function() {
+ return $wnd.itmill.versionInfo;
+ }
+ $wnd.itmill.startTT(testServerUri, client);
}-*/;
public static Console getConsole() {
window.handleParameters(parameters);
}
- writeAjaxPage(request, response, window, themeName);
+ writeAjaxPage(request, response, window, themeName, application);
}
// For normal requests, transform the window
* store represented by the given URL.
*/
private void writeAjaxPage(HttpServletRequest request,
- HttpServletResponse response, Window window, String themeName)
- throws IOException, MalformedURLException {
+ HttpServletResponse response, Window window, String themeName,
+ Application application) throws IOException, MalformedURLException {
response.setContentType("text/html");
final BufferedWriter page = new BufferedWriter(new OutputStreamWriter(
response.getOutputStream()));
page.write(", testingToolsUri : '" + getTestingToolsUri(request)
+ "'");
}
+ if (testingToolsActive) {
+ page.write(", versionInfo : {toolkitVersion:\"");
+ page.write(VERSION);
+ page.write("\",applicationVersion:\"");
+ page.write(application.getVersion());
+ page.write("\"}");
+ }
page.write("\n};\n</script>\n");