title: How to hide a Vaadin 7 UI embedded on a non-Vaadin page?
body: <p>I'm embedding a Vaadin application within a non-Vaadin web page, using a the "div" technique, as described in <a href="https://vaadin.com/book/-/page/advanced.embedding.html" rel="nofollow">https://vaadin.com/book/-/page/advanced.embedding.html</a></p>
  
  <p>I'd like to completely hide the Vaadin UI in some circumstances and show at other times.</p>
  
  <p>Is this possible <strong>from within the Vaadin app</strong> and if so, how?</p>
  
  <p>We've looked at:</p>
  
  <ul>
  <li>JavaScript.getCurrent().execute("document.getElementById('my_vaadin_div').style.display = 'none';"); - Works but not pure Java...</li>
  <li>GWT's DOM.getElementById("my_vaadin_div").setAttribute("display", "none"); - Doesn't work probably because DOM is client side GWT.</li>
  </ul>