title: GWT Platform UiHandlers not working
body: <p>I have followed the GettingStarted on the GWTP tutorial</p>
  
  <p><a href="http://code.google.com/p/gwt-platform/wiki/GettingStarted" rel="nofollow noreferrer">http://code.google.com/p/gwt-platform/wiki/GettingStarted</a></p>
  
  <p>but unfortunately handlers not working, getUiHandlers() return null and exception stacktrace is same as in:</p>
  
  <p><a href="https://stackoverflow.com/questions/13171157/how-to-use-uihandlers-of-gwt-platform">How to use UiHandlers of GWT Platform?</a>
  .</p>
  
  <p><strong>View Class</strong></p>
  
  <pre><code>public class AView extends ViewWithUiHandlers&lt;AUiHandlers&gt; implements APresenter.Display {
  
      @UiTemplate("AView.ui.xml")
      interface AViewUiBinder extends UiBinder&lt;Widget, AView&gt; {}
      private static AViewUiBinder uiBinder = GWT.create(AViewUiBinder.class);
  
      @UiField Button saveBtn;
      @UiField Button cancelBtn;
  
      @UiField DivElement errorDiv;
  
      private Widget widget;
  
      @Inject
      public AssetView() {
          widget = uiBinder.createAndBindUi(this);
      }
  
      public Widget asWidget() {
          return widget;
      }
  
      // Implementation: Presenter's Display methods
      public void setErrorDivText(String msg) {
          errorDiv.getStyle().setDisplay(Display.BLOCK);
          errorDiv.setInnerText(msg);     
      }
  
      // Handlers 
      @UiHandler("saveBtn")
      void onSaveButtonClick(ClickEvent event) {
          if(getUiHandlers() != null) {
              getUiHandlers().onSaveButtonClick();
          }
      }
  
      @UiHandler("cancelBtn")
      void onCancelButtonClick(ClickEvent event) {
          if(getUiHandlers() != null) {
              getUiHandlers().onCancelButtonClick();
          }
      }
  }
  </code></pre>
  
  <p><strong>Handler Interface</strong></p>
  
  <pre><code>public interface AUiHandlers extends UiHandlers {
      void onSaveButtonClick();
      void onCancelButtonClick();
  }
  </code></pre>
  
  <p><strong>Presenter</strong></p>
  
  <pre><code>public class APresenter extends Presenter&lt;APresenter.Display, APresenter.AssetProxy&gt; implements AUiHandlers {
  
      public interface Display extends View, HasUiHandlers&lt;AUiHandlers&gt; { 
          public void setErrorDivText(String msg);
      }
  
      @ProxyStandard
      @NameToken(NameTokens.ASSET)
      public interface AssetProxy extends ProxyPlace&lt;AssetPresenter&gt; {}
  
      @Inject
      public AssetPresenter(EventBus eventBus, Display view, AssetProxy proxy) {
          super(eventBus, view, proxy);
  
          getView().setUiHandlers(this);
      }
  
      @Override
      protected void onBind() {
          super.onBind();
      }
  
      @Override
      protected void revealInParent() {
          RevealRootContentEvent.fire( this, this );
      }
  
      public void onSaveButtonClick() {
          getView().setErrorDivText("Save clicked.");
      }
  
      public void onCancelButtonClick() {
          getView().setErrorDivText("Cancel clicked.");
      }
  }
  </code></pre>
  
  <p>Unable to understand where i am making mistake, implementation regarding UiHandlers is same as told in the above mentioned tutorial's link.</p>