What does the BootstrapListener in the dashboard sample do? More generally what is an extension of CubaBootstrapListener intended to be used for? I didn’t see it mentioned in the documentation.
package com.company.dashboard.web.bootstrap;
import com.haulmont.cuba.web.sys.CubaBootstrapListener;
import com.vaadin.server.BootstrapPageResponse;
import org.jsoup.nodes.Element;
public class BootstrapListener extends CubaBootstrapListener {
@Override
public void modifyBootstrapPage(BootstrapPageResponse response) {
super.modifyBootstrapPage(response);
Element head = response.getDocument().getElementsByTag("head").get(0);
includeMetaViewport("width=device-width, initial-scale=0.8", response, head);
}
protected void includeMetaViewport(String content, BootstrapPageResponse response, Element head) {
Element meta = response.getDocument().createElement("meta");
meta.attr("name", "viewport");
meta.attr("content", content);
head.appendChild(meta);
}
}