From 99d6de546c74f0eed230ea8253dda6b85109d2e7 Mon Sep 17 00:00:00 2001 From: Markus Koivisto Date: Fri, 22 Jan 2016 14:55:18 +0200 Subject: Add documentation to master branch Change-Id: I2504bb10f1ae73ec0cbc08b7ba5a88925caa1674 --- documentation/advanced/advanced-embedding.asciidoc | 460 +++++++++++++++++++++ 1 file changed, 460 insertions(+) create mode 100644 documentation/advanced/advanced-embedding.asciidoc (limited to 'documentation/advanced/advanced-embedding.asciidoc') diff --git a/documentation/advanced/advanced-embedding.asciidoc b/documentation/advanced/advanced-embedding.asciidoc new file mode 100644 index 0000000000..ca2ccd3a0e --- /dev/null +++ b/documentation/advanced/advanced-embedding.asciidoc @@ -0,0 +1,460 @@ +--- +title: Embedding UIs in Web Pages +order: 2 +layout: page +--- + +[[advanced.embedding]] += Embedding UIs in Web Pages + +Many web sites are not all Vaadin, but Vaadin UIs are used only for specific +functionalities. In practice, many web applications are a mixture of dynamic web +pages, such as JSP, and Vaadin UIs embedded in such pages. + +Embedding Vaadin UIs in web pages is easy and there are several different ways +to embed them. One is to have a [literal]#++
++# placeholder for the UI and +load the Vaadin Client-Side Engine with some simple JavaScript code. Another +method is even easier, which is to simply use the [literal]#++ +---- + +endif::web[] + +ifdef::web[] +[[advanced.embedding.div.div]] +=== UI Placeholder Element + +A Vaadin UI is embedded in a placeholder [literal]#++
++# element. It should +have the following features: + +* The [literal]#++
++# element must have an [literal]#++id++# attribute, which must be a unique ID in the page, normally something that identifies the servlet of the UI uniquely. +* It must have at least the [literal]#++v-app++# style class. +* it should have a nested [literal]#++
++# element with [literal]#++v-app-loading++# style class. This is a placeholder for the loading indicator that is displayed while the UI is being loaded. +* It should also contain a [literal]#++