setStyleSheet(Styles.DEFAULT_STYLE_SHEET);
mainWindow = new Window();
mainWindow.setTitle("NextApp Echo2 Test Application");
mainWindow.setContent(new WelcomePane());
ContainerContext cc = (ContainerContext) getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
if (!LIVE_DEMO_SERVER) {
if (cc.getInitialRequestParameterMap().containsKey("ghost")) {
GhostTask ghostTask = new GhostTask();
if ("1".equals(getRequestParameter("script"))) {
ghostTask.setScript(GHOST_SCRIPT_1);
}
if (cc.getInitialRequestParameterMap().containsKey("clicks")) {
ghostTask.setClicksPerIteration(Integer.parseInt(getRequestParameter("clicks")));
}
if (cc.getInitialRequestParameterMap().containsKey("iterations")) {
ghostTask.setTotalIterations(Integer.parseInt(getRequestParameter("iterations")));
}
startGhostTask(ghostTask, 0);
}
}
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setProperty(ClientConfiguration.PROPERTY_SERVER_ERROR_MESSAGE,
"KA-BOOM! (test non-default server error message)");
cc.setClientConfiguration(clientConfiguration);
return mainWindow;
}