Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    HasClickHandler interface

    in order to decouple presenter from view in MVP (see example here http://code.google.com/webtoolkit/do...itecture.html), the HasClickHandler interface was implemented by com.google.gwt.user.client.ui.Button widget. Thus, you can then have, in your presenter, a 'Display' interface that has methods like 'getAddButton' which returns a 'HasClickHandlers' interface. This allows the presenter to not be dependent on the view implementation but still be able to register a click handler callback on a button.

    Can this interface be added to smartGWT buttons, etc?



    I just found that SmartGWT has Button class implementing 'HasIconClickHandlers' which is similar to 'HasClickHandlers' .
    So, perhaps a more general question would be: Are the best practices like MVP, DI, EventBus, History and others documented and possibly demonstrated in SmartGWT sample code?
    Last edited by jorel; 20 Apr 2010, 13:08.

    #2
    I'm wondering the same. It's weird because the javadoc says it does implement the HasClickHandlers interface.

    Link to IButton javadoc: http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/widgets/IButton.html

    I'm using SmartGWT 2.2 found at http://code.google.com/p/smartgwt/

    Comment


      #3
      Oops, the errors I was encountering were because I imported the HasClickHandlers class from com.google.gwt.event.dom.client instead of the one from com.smartgwt.client.widgets.events.

      Comment

      Working...
      X