JSONObject defaults = getDefaultParameters(context);
JSONObject appConfig = getApplicationParameters(context);
- boolean isDebug = !context.getApplication().isProductionMode();
+ boolean isDebug = !context.getApplication().getConfiguration()
+ .isProductionMode();
builder.append("vaadin.setDefaults(");
appendJsonObject(builder, defaults, isDebug);
+ VaadinServlet.WIDGETSET_DIRECTORY_PATH;
defaults.put("widgetsetBase", widgetsetBase);
- if (!application.isProductionMode()) {
+ if (!application.getConfiguration().isProductionMode()) {
defaults.put("debug", true);
}
CurrentInstance.setInheritable(VaadinSession.class, session);
}
- /**
- * Check whether this application is in production mode. If an application
- * is in production mode, certain debugging facilities are not available.
- *
- * @return the status of the production mode flag
- *
- * @since 7.0
- */
- @Deprecated
- public boolean isProductionMode() {
- return configuration.isProductionMode();
- }
-
public void addUIProvider(UIProvider uIProvider) {
uiProviders.add(uIProvider);
}
@Override
public void buttonClick(ClickEvent event) {
String msg = "Running in ";
- msg += VaadinSession.getCurrent().isProductionMode() ? "production"
- : "debug";
+ msg += VaadinSession.getCurrent().getConfiguration()
+ .isProductionMode() ? "production" : "debug";
Notification.show(msg);
}
});