code: public static String getBootstrapScript(CmsObject cms, String elementId, String servicePath) throws Exception {
  
          String script = BOOTSTRAP_SCRIPT;
          CmsMacroResolver resolver = new CmsMacroResolver();
          String context = OpenCms.getSystemInfo().getContextPath();
          String vaadinDir = CmsStringUtil.joinPaths(context, "VAADIN/");
          String vaadinVersion = Version.getFullVersion();
          String vaadinServlet = CmsStringUtil.joinPaths(context, servicePath);
          String vaadinBootstrap = CmsStringUtil.joinPaths(context, "VAADIN/vaadinBootstrap.js");
          resolver.addMacro("vaadinDir", vaadinDir);
          resolver.addMacro("vaadinVersion", vaadinVersion);
          resolver.addMacro("elementId", elementId);
          resolver.addMacro("vaadinServlet", vaadinServlet);
          resolver.addMacro("vaadinBootstrap", vaadinBootstrap);
          script = resolver.resolveMacros(script);
          return script;
  
      }
docs: Returns the Javascript code to use for initializing a Vaadin UI.<p>
  
  @param cms the CMS context
  @param elementId the id of the DOM element in which to initialize the UI
  @param servicePath the UI servlet path
  @return the Javascript code to initialize Vaadin
  
  @throws Exception if something goes wrong