com.vaadin.flow.component.page.
Interface AppShellConfigurator
-
All Superinterfaces:
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>
elementInline
: inlines a static content in any point of the documentViewport
: defines the viewport tag of the pageBodySize
: configures the size of the bodyPageTitle
: establishes the page titlePush
: configures automatic server pushPWA
: 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 above. The application would fail to start if any of these annotations is wrongly placed on a class other than the application shell class.
@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
All Methods Modifier and Type Method Description default void
configurePage​(AppShellSettings settings)
Configure the initial application shell settings when called.
-
-
-
Method Detail
-
configurePage
default void configurePage​(AppShellSettings settings)
Configure the initial application shell settings when called.
Parameters:
settings
- initial application shell settings
-
-