title: Change the state in a Vaadin custom widget in the connector through a GWT button click and get it server side
body: <p>I am trying to set the state in a Vaadin custom widget from a click generated by the user.  In the component connector after instantiating the server rpc I get the GWT button and add an onclick method.  In the method I set the state (getState.text = "new text";) but when I try to get it from the server side I get the original state text. The onStateChange method is not triggered.  </p>
  
  <p>Code in the connector:</p>
  
  <pre><code>        getWidget().getSaveButton().addClickHandler(new ClickHandler() {
  
          @Override
          public void onClick(ClickEvent event) {
              alert("does it work without jquery?");
              getState().text = "text changed from connector";
              getWidget().getTextBox().setText(getState().text);
          }
      });
  </code></pre>
  
  <p>after clicking GWT button the textbox contains the text to "text changed from connector"</p>
  
  <p>In the state:</p>
  
  <pre><code>public String text = "original state text";
  </code></pre>
  
  <p>The UI implementation to get the state:</p>
  
  <pre><code>vaadinButton.addClickListener(new ClickListener() {
  
          @Override
          public void buttonClick(ClickEvent event) {
              Notification.show(sig.getState().text);
  
          }
      });
  </code></pre>
  
  <p>When clicking the vaadin button after clicking the GWT button the notification still displays "original state text". </p>
  
  <p>My question:
  How do I change the state in the connector so it triggers the onStateChange method and I get the text changes server side?</p>