Interface AppShellConfigurator

All Superinterfaces:
Serializable
All Known Implementing Classes:
FakeAppConf

public interface AppShellConfigurator extends Serializable
An interface to configure application features and the host page where the Vaadin application is running. It automatically configures the index.html page. Configuration can be done using a class implementing this interface with following annotations that affect the generated index.html page (also known as 'application shell'):
  • Meta: appends an HTML <meta> tag to the bottom of the <head> element
  • Inline: inlines a static content in any point of the document
  • Viewport: defines the viewport tag of the page
  • BodySize: configures the size of the body
  • PageTitle: establishes the page title
  • Push: configures automatic server push
  • PWA: defines application PWA properties

There is a single application shell for the entire Vaadin application, and there can only be one class implementing AppShellConfigurator per Application.

NOTE: the application shell class is the only valid target for the page configuration annotations listed below. The application would fail to start if any of these annotations is wrongly placed on a class other than the application shell class.

Example:

 
 @Meta(name = "Author", content = "Donald Duck")
 @PWA(name = "My Fun Application", shortName = "fun-app")
 @Inline("my-custom-javascript.js")
 @Viewport("width=device-width, initial-scale=1")
 @BodySize(height = "100vh", width = "100vw")
 @PageTitle("my-title")
 @Push(value = PushMode.AUTOMATIC, transport = Transport.WEBSOCKET_XHR)
 public class AppShell implements AppShellConfigurator {
 }
 
 
Since:
3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Configure the initial application shell settings when called.
  • Method Details

    • configurePage

      default void configurePage(AppShellSettings settings)
      Configure the initial application shell settings when called.
      Parameters:
      settings - initial application shell settings