title: Passing a object from server to client with Vaadin
body: <p>I want to pass an object from the server to the client with Vaadin:</p>
  
  <p>My object:</p>
  
  <pre><code>public class MyObject {
      public String name;
      public int value;
  }
  </code></pre>
  
  <p>Then I have a component extending <code>AbstractJavaScriptComponent</code>, which has this:</p>
  
  <pre><code>public void doStuff(MyObject obj) {
      callFunction("doStuff", obj);
  }
  </code></pre>
  
  <p>The JavaScript function <code>doStuff</code> is then correctly called, but the argument I get doesn't have the properties <code>name</code> and <code>value</code>, the type of the argument is correct (<code>MyObject</code>). </p>
  
  <p><code>MyObject</code> is part of the WidgetSet (it is in the *.client namespace), though I don't know if that is even a must..</p>
  
  <p>What's going wrong?</p>