What Myles describe is discussed here:
http://code.google.com/webtoolkit/articles/mvp-architecture-2.html
And there:
http://arcbees.wordpress.com/2010/09/18/uihandlers-and-supervising-controlers/
It really makes it easier to use cool features like @UiHandler,
however if you want to keep your old approach here's how you can do:
public interface HasClickAndChangeHandlers extends HasClickHandlers,
HasChangeHandlers {}
public class HasClickAndChangeHandlersImpl<T extends HasClickHandlers
& HasChangeHandlers>
implements HasClickAndChangeHandlers {
T widget;
public HasClickAndChangeHandlersImpl(T widget) {
this.widget = widget;
}
@Override
public HandlerRegistration addClickHandler(ClickHandler handler) {
return widget.addClickHandler(handler);
}
@Override
public HandlerRegistration addChangeHandler(ChangeHandler handler) {
return widget.addChangeHandler(handler);
}
@Override
public void fireEvent(GwtEvent<?> event) {
widget.fireEvent(event);
}
}
On Dec 14, 10:49 am, Myles Bostwick <[email protected]> wrote:
> I solve this by passing in the presenter to the view, the view catches these
> events and calls a particular method on the presenter. That way the
> presenter doesn't have to know anything about the view code. Hope that's
> helpful.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.