Sample Include File for: Use Dojo With Vaadin / Inject External File Into Head Block Of Vaadin Page Response


/ Published in: HTML
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <!--
  2.  
  3. User: Laurence Toenjes
  4. Date: 2011-07-30 10:16:30
  5.  
  6. file: header.inc.htm
  7. This file goes above the WEB-INF folder.
  8.  
  9. This is a sample header include file to use Dojo with Vaadin.
  10.  
  11. The header.inc.htm file text gets injected by using a customized Vaadin app servlet.
  12.  
  13. See:
  14.  
  15. http://snipplr.com/view/57394/use-dojo-with-vaadin--inject-external-file-into-head-block-of-vaadin-page-response/
  16.  
  17. -->
  18.  
  19. <!-- header.inc.htm beg -->
  20.  
  21. <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/resources/dojo.css" />
  22.  
  23. <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/tundra/tundra.css" />
  24.  
  25. <style type="text/css">
  26. /* put styles here */
  27.  
  28. <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" type="text/javascript"
  29. djConfig="parseOnLoad: false">
  30.  
  31. <script type="text/javascript" >
  32.  
  33. // dojo includes
  34. dojo.require("dojo.parser");
  35. dojo.require("dijit.form.Button");
  36.  
  37.  
  38. <script type="text/javascript">
  39. // <![CDATA[
  40. dojo.ready( function() {
  41. dojo.addClass( dojo.body() , "tundra");
  42. dojo.parser.parse();
  43. } );
  44. // ]]>
  45.  
  46. <!-- header.inc.htm end -->

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.