title: Adding a ValueChangeListener to CustomComponent
body: <p>I have a custom component and want to add a ValueChangeListener to it.
  But I have a problem with the registration method.</p>
  
  <p>This is my custom component.</p>
  
  <pre><code>public class CustomComp extends CssLayout implements HasValue&lt;HashMap&lt;String, Boolean&gt;&gt;{
  
  private String value;
  
  @Override
      public void setValue(String value) {
          // TODO Auto-generated method stub
          this.value = value;
  
      }
  
      @Override
      public String getValue() {
          // TODO Auto-generated method stub
          return value;
      }
  
      @Override
      public Registration addValueChangeListener(com.vaadin.data.HasValue.ValueChangeListener&lt;String&gt; listener) {
          // TODO Auto-generated method stub
          System.out.println("Value Changed");
          return null;
  
      }
  
      @Override
      public void setRequiredIndicatorVisible(boolean requiredIndicatorVisible) {
          // TODO Auto-generated method stub
  
      }
  
      @Override
      public boolean isRequiredIndicatorVisible() {
          // TODO Auto-generated method stub
          return false;
      }
  
      @Override
      public void setReadOnly(boolean readOnly) {
          // TODO Auto-generated method stub
  
      }
  
      @Override
      public boolean isReadOnly() {
          // TODO Auto-generated method stub
          return false;
      }
  
  
  }
  </code></pre>
  
  <p>I want to create a object of my component and add a ValueChangeEvent like this but I think that I have to change the addValueChangeListener but I don´t know exactly how. I know that the method is called because the sysout "Value changed" is executed. But I want to add the listener like this.</p>
  
  <pre><code>MyCustomComp myCustomComp = new MyCustomComp();
  myCustomComp.addValueChangeEvent(event -&gt;{...});
  </code></pre>
  
  <p>I have already looked in other classes but this is different on every class.</p>