Example usage for com.vaadin.server BootstrapPageResponse getDocument

List of usage examples for com.vaadin.server BootstrapPageResponse getDocument

Introduction

In this page you can find the example usage for com.vaadin.server BootstrapPageResponse getDocument.

Prototype

public Document getDocument() 

Source Link

Document

Gets the document node representing the root of the DOM hierarchy that will be used to generate the HTML page.

Usage

From source file:org.vaadin.volga.SeoBootstrapListener.java

private void meta(BootstrapPageResponse response, String name, String content) {
    Element head = response.getDocument().getElementsByTag("head").get(0);
    Element meta = response.getDocument().createElement("meta");
    meta.attr("name", name);
    meta.attr("content", content);
    head.appendChild(meta);/*w  w  w . ja  v a2 s.c  om*/
}