title: gwt; mixing html pages with java code
body: <p>I really like the approach in GWT where you can define "divs", "spans" etc in a regular html page, then in the GWT entry point simply push a button or some other component inside the div. </p>
  
  <p>So small example, here is a snippet of a gwt html page:</p>
  
  <pre><code>&lt;body class='page'&gt;
      &lt;iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position: absolute; width: 0; height: 0; border: 0"&gt;&lt;/iframe&gt;
  
      &lt;div&gt;
          Query Terms: &lt;span id="txtQuery"&gt;&lt;/span&gt;&amp;nbsp;
          &lt;span id="btnQuery"&gt;&lt;/span&gt;&lt;br&gt;
          ...
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>And here is a small java snippet contained in the gwt entry point:</p>
  
  <pre><code>ClickHandler clickHandler = ...
  TextBox txtQuery = new TextBox();
  Button btnQuery = new Button("Query", clickHandler);
  
  RootPanel.get("txtQuery").add(txtQuery);
  RootPanel.get("btnQuery").add(btnQuery);
  </code></pre>
  
  <p>One of the reasons I like this approach is that it allows non java coders to design / write the html stuff, and I also like the separation between GWT / java code and the html code.</p>
  
  <p>However... this may work well for a simple web page, but how do you scale this approach up into many webpages? From what I understand, the "GWT way" of doing things is to have one webpage and use history to hide and show various GWT components. I have built 2 projects in GWT using this standard technique, but recently discovered that you can do the sort of thing I showed above.</p>
  
  <p>Is there any way of scaling the above 2 snippets into multiple html pages, where GWT injects its components into standard html pages?</p>