title: Singleton in GWT project
body: <p>Could some explain me something. Here is some scenario.</p>
  
  <p>Let assume i have a class template and use Gin/Guice in the app.</p>
  
  <pre><code>@Singleton
  public class Template extends Compose
  {
  private HorizontalPanel header;
  private HorizontalPanel content;
  private VerticalPanel menu;
  
      public Template()
      {
        this.add(initHeader());
        this.add(initMenu());
        this.add(initContent());
      }
  
      public void setContent(Widget widget)
      {
        content.clear();
        content.add(widget);
      }
      .............
      ......
      }
  </code></pre>
  
  <p>and in the entry class</p>
  
  <pre><code>........
  public void onModuleLoad()
  {
  
  RootPanel.get().add(new Template());
  ....
  }
  </code></pre>
  
  <p>Every time i need to reload the content i do..</p>
  
  <p>For example</p>
  
  <pre><code>HorizontalPanel hp = new HorizontalPanel();
  hp.add ....
  ...
  
  Template template = injector.getTemplate(); // return singleton instance using gin
  template.setContent(hp)
  </code></pre>
  
  <p>and so on.. </p>
  
  <p>So, Template is singleton and as far as i know singleton instance is one per VM meaning shared by entire application, right? 
  Template class has header, menu and content, the idea is to reload only the content part as cleaning and adding widgets.
  But is this a good approach? </p>
  
  <p>For example, could we have a situation like user "A" setContent(widgetA) ,but in the same time user "B" use method setContent(widgetB) ,so what is going to happen here?</p>
  
  <p>Thanks, if anyone could share with me a good approach eventually and comment that one.</p>
  
  <p>Regards</p>