gwt - how to use eventBus.removeHandler in mvp4g? -
i wanted delete/clear instances of presenter before firing event. documentation says use eventbus.removehandler(handler), not figure out how handler object presenter class
presenter has multiple=true attribute set.
if have declared presenter "multiple="true"
@presenter(view=oneview.class, multiple=true) public class onepresenter extends basepresenter<ioneview, oneeventbus>{...}
you add presenter eventbus calling:
onepresenter presenter = eventbus.addhandler(onepresenter.class);
and remove presenter calling:
eventbus.removehandler(presenter);
here find documentation:
in mvp4g can activate , deactive presenters activate/deactivate attribute of @event annotation. (https://github.com/frankhossfeld/mvp4g/wiki/03.-defining-eventbus#activatingdeactivating-presenters)
if need control before presenter handles event, can override onbeforeevent
-method. (https://github.com/frankhossfeld/mvp4g/wiki/04.-defining-presenters,-views-&-services#on-before-event)
Comments
Post a Comment