* @param request
* the wrapped request for which the bootstrap page should be
* generated
- * @param application
- * the application for which the bootstrap page should be
+ * @param session
+ * the vaadin session for which the bootstrap page should be
* generated
* @param uiClass
* the class of the UI that will be displayed on the page
* application HTML
*/
public BootstrapFragmentResponse(BootstrapHandler handler,
- WrappedRequest request, VaadinSession application,
+ WrappedRequest request, VaadinSession session,
Class<? extends UI> uiClass, List<Node> fragmentNodes) {
- super(handler, request, application, uiClass);
+ super(handler, request, session, uiClass);
this.fragmentNodes = fragmentNodes;
}
return bootstrapResponse.getRequest();
}
- public VaadinSession getApplication() {
- return bootstrapResponse.getApplication();
+ public VaadinSession getVaadinSession() {
+ return bootstrapResponse.getVaadinSession();
}
public Class<? extends UI> getUIClass() {
Map<String, Object> headers = new LinkedHashMap<String, Object>();
Document document = Document.createShell("");
BootstrapPageResponse pageResponse = new BootstrapPageResponse(
- this, request, context.getApplication(),
+ this, request, context.getVaadinSession(),
context.getUIClass(), document, headers);
List<Node> fragmentNodes = fragmentResponse.getFragmentNodes();
Element body = document.body();
}
setupStandaloneDocument(context, pageResponse);
- context.getApplication().modifyBootstrapResponse(pageResponse);
+ context.getVaadinSession().modifyBootstrapResponse(pageResponse);
sendBootstrapHeaders(response, headers);
head.appendElement("meta").attr("http-equiv", "X-UA-Compatible")
.attr("content", "chrome=1");
- String title = context.getApplication()
+ String title = context.getVaadinSession()
.getUiProvider(context.getRequest(), context.getUIClass())
.getPageTitleForUI(context.getRequest(), context.getUIClass());
if (title != null) {
public String getWidgetsetForUI(BootstrapContext context) {
WrappedRequest request = context.getRequest();
- String widgetset = context.getApplication()
+ String widgetset = context.getVaadinSession()
.getUiProvider(context.getRequest(), context.getUIClass())
.getWidgetsetForUI(context.getRequest(), context.getUIClass());
if (widgetset == null) {
*/
String appClass = "v-app-"
- + context.getApplication().getClass().getSimpleName();
+ + context.getVaadinSession().getClass().getSimpleName();
String classNames = "v-app " + appClass;
List<Node> fragmentNodes = context.getBootstrapResponse()
JSONObject defaults = getDefaultParameters(context);
JSONObject appConfig = getApplicationParameters(context);
- boolean isDebug = !context.getApplication().getConfiguration()
+ boolean isDebug = !context.getVaadinSession().getConfiguration()
.isProductionMode();
builder.append("vaadin.setDefaults(");
protected JSONObject getApplicationParameters(BootstrapContext context)
throws JSONException, PaintException {
- VaadinSession application = context.getApplication();
-
JSONObject appConfig = new JSONObject();
if (context.getThemeName() != null) {
JSONObject defaults = new JSONObject();
WrappedRequest request = context.getRequest();
- VaadinSession application = context.getApplication();
+ VaadinSession session = context.getVaadinSession();
VaadinService vaadinService = request.getVaadinService();
// Get system messages
+ VaadinServlet.WIDGETSET_DIRECTORY_PATH;
defaults.put("widgetsetBase", widgetsetBase);
- if (!application.getConfiguration().isProductionMode()) {
+ if (!session.getConfiguration().isProductionMode()) {
defaults.put("debug", true);
}
* @return
*/
public String getThemeName(BootstrapContext context) {
- return context.getApplication()
+ return context.getVaadinSession()
.getUiProvider(context.getRequest(), context.getUIClass())
.getThemeForUI(context.getRequest(), context.getUIClass());
}
* @param request
* the wrapped request for which the bootstrap page should be
* generated
- * @param application
- * the application for which the bootstrap page should be
+ * @param session
+ * the vaadin session for which the bootstrap page should be
* generated
* @param uiClass
* the class of the UI that will be displayed on the page
* a map into which header data can be added
*/
public BootstrapPageResponse(BootstrapHandler handler,
- WrappedRequest request, VaadinSession application,
+ WrappedRequest request, VaadinSession session,
Class<? extends UI> uiClass, Document document,
Map<String, Object> headers) {
- super(handler, request, application, uiClass);
+ super(handler, request, session, uiClass);
this.headers = headers;
this.document = document;
}
*/
public abstract class BootstrapResponse extends EventObject {
private final WrappedRequest request;
- private final VaadinSession application;
+ private final VaadinSession session;
private final Class<? extends UI> uiClass;
/**
* @param request
* the wrapped request for which the bootstrap page should be
* generated
- * @param application
- * the application for which the bootstrap page should be
- * generated
+ * @param session
+ * the session for which the bootstrap page should be generated
* @param uiClass
* the class of the UI that will be displayed on the page
*/
public BootstrapResponse(BootstrapHandler handler, WrappedRequest request,
- VaadinSession application, Class<? extends UI> uiClass) {
+ VaadinSession session, Class<? extends UI> uiClass) {
super(handler);
this.request = request;
- this.application = application;
+ this.session = session;
this.uiClass = uiClass;
}
}
/**
- * Gets the application to which the rendered view belongs.
+ * Gets the vaadin session to which the rendered view belongs.
*
- * @return the application
+ * @return the vaadin session
*/
- public VaadinSession getApplication() {
- return application;
+ public VaadinSession getVaadinSession() {
+ return session;
}
/**