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:

https://github.com/frankhossfeld/mvp4g/wiki/04.-defining-presenters,-views-&-services#multiple-presenter

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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -