/ Published in: Groovy
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Created by IntelliJ IDEA. * User: laurence * Date: Jul 29, 2011 * Time: 8:06:44 PM * * com.vaadin.terminal.gwt.server.ApplicationServlet2 * * Needed to create this for Dojo to work with Vaadin. * * This looks for a file named header.inc.htm in * dir getServletContext().getRealPath("."); * and injects it into a vaadin page response (providing it exists) * * You must change your vaadin servlet name in web.xml * from: com.vaadin.terminal.gwt.server.ApplicationServlet * to: com.vaadin.terminal.gwt.server.ApplicationServlet2 * * Also noticed the inline dojo method script button onClick events * do not work in Vaadin custom layout templates * but the new dojo html5 way of handling button clicks does work * * Also had to use dojo to update the body class to the tundra style * <script type="text/javascript"> // <![CDATA[ dojo.ready( function() { dojo.addClass( dojo.body() , "tundra"); } ); // ]]> </script> * * */ } } // ij ide """ syntax highlighting workaround <!-- header.inc.htm web path: . file path: ${a_path} --> '''.trim(); } @Override HttpServletRequest request) writeDebugString1( page, sPath3 ); } } // }