diff options
author | elmot <elmot@vaadin.com> | 2015-09-25 16:40:44 +0300 |
---|---|---|
committer | elmot <elmot@vaadin.com> | 2015-09-25 16:40:44 +0300 |
commit | a1b265c318dbda4a213cec930785b81e4c0f7d2b (patch) | |
tree | b149daf5a4f50b4f6446c906047cf86495fe0433 /documentation/clientsideapp/clientsideapp-loading.asciidoc | |
parent | b9743a48a1bd0394f19c54ee938c6395a80f3cd8 (diff) | |
download | vaadin-framework-a1b265c318dbda4a213cec930785b81e4c0f7d2b.tar.gz vaadin-framework-a1b265c318dbda4a213cec930785b81e4c0f7d2b.zip |
Framework documentation IN
Change-Id: I767477c1fc3745f9e1f58075fe30c9ac8da63581
Diffstat (limited to 'documentation/clientsideapp/clientsideapp-loading.asciidoc')
-rw-r--r-- | documentation/clientsideapp/clientsideapp-loading.asciidoc | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/documentation/clientsideapp/clientsideapp-loading.asciidoc b/documentation/clientsideapp/clientsideapp-loading.asciidoc new file mode 100644 index 0000000000..1ac6ddce1a --- /dev/null +++ b/documentation/clientsideapp/clientsideapp-loading.asciidoc @@ -0,0 +1,54 @@ +--- +title: Loading a Client-Side Application +order: 4 +layout: page +--- + +[[clientsideapp.loading]] += Loading a Client-Side Application + +You can load the JavaScript code of a client-side application in an HTML __host +page__ by including it with a [literal]#++<script>++# tag, for example as +follows: + + +---- +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" + content="text/html; charset=UTF-8" /> + + <title>Embedding a Vaadin Application in HTML Page</title> + + <!-- Load the Vaadin style sheet --> + <link rel="stylesheet" + type="text/css" + href="/myproject/VAADIN/themes/reindeer/legacy-styles.css"/> + </head> + + <body> + <h1>A Pure Client-Side Application</h1> + + <script type="text/javascript" language="javascript" + src="clientside/com.example.myapp.MyModule/ + com.example.myapp.MyModule.nocache.js"> + </script> + </body> +</html> +---- + +The JavaScript module is loaded in a [literal]#++<script>++# element. The +[literal]#++src++# parameter should be a relative link from the host page to the +compiled JavaScript module. + +If the application uses any supplementary Vaadin widgets, and not just core GWT +widgets, you need to include the Vaadin theme as was done in the example. The +exact path to the style file depends on your project structure - the example is +given for a regular Vaadin application where themes are contained in the +[filename]#VAADIN# folder in the WAR. + +In addition to CSS and scripts, you can load any other resources needed by the +client-side application in the host page. + + + |