eventhandler on composites?

6 views
Skip to first unread message

Leather Dog Muksihs

unread,
Jun 7, 2018, 8:46:08 AM6/7/18
to mvp4g
Is there a simple way to directly annotate composites (or other class files) without the need for having to extend the abstract handler to receive events?

Frank Hossfeld

unread,
Jun 9, 2018, 6:50:27 AM6/9/18
to Mvp4g
The idea is, that only presenter or handler (Presener without view) can recieve and fire events. Regarding this pattern, in case the view wants to fire an event, the view has to delegate the request to the presenter. The AbstractPresenter class and AbstractHandler is used to keep some informations needed by the framework and to inject the event bus (both)  and in case it is a presenter the view instance.

If there is a requirement to deal with events and the class does not have a view, handlers can be used.

A screen is always represented by a presenter view pair. Classes without views are handlers in mvp4 and mvp4g2.

A view has to extend LazyReverseView. This allows the framdwork to inject the presetner instance into the view. Regarding J2CL / GWT 3, GWT.create, replacement rules and some other things will be gone. New widget libs start wirking without using the GWT Composite- or Widget-classes. 

Hope that helps.

 
Reply all
Reply to author
Forward
0 new messages