Thankyou, do you mean "SelectorsExt.subscribeEventQueues(this);" is enough to take care auto Unsubscription when exited from respective viewModel?
wastemails ( 2022-05-05 17:21:31 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
@AfterCompose
public void doAfterCompose(@ContextParam(ContextType.VIEW) Component view,@ContextParam(ContextType.BINDER) Binder binder) {
Object object = SelectorsExt.subscribeEventQueues(this);
//SelectorsExt.ExtendedUtilityHandlerImpl extendedUtilityHandler = new SelectorsExt.ExtendedUtilityHandlerImpl();
//extendedUtilityHandler.postSubscriptionHandling(object, view);
@Subscribe(value = "on.update", scope = "application", eventName = "on.update")
public void test(String value){
}
Above code is not autounSubscribing, if enabled commented lines only autoUnsubscribing is working.
Auto-Unsubscribed only works when using SelectoComposer
by default instead of a ViewModel.
Please see Auto-Unsubscribed.
Since you call SelectorsExt.subscribeEventQueues(this);
in a ViewModel, your @Subscribe
still works and can receive events from an event queue.
If you check ServerPushEventQueue.subscribe()
, it add a listener EQCleanup
that will remove the subscriber's listener when a desktop is destroyed:
_dtInfos.put(desktop, di = new DesktopInfo(desktop, new EQService(), new EQCleanup()));
So, you don't need to call postSubscriptionHandling()
.
Thankyou, do you mean "SelectorsExt.subscribeEventQueues(this);" is enough to take care auto Unsubscription when exited from respective viewModel?
wastemails ( 2022-05-05 17:21:31 +0800 )editAsked: 2022-04-28 08:13:43 +0800
Seen: 5 times
Last updated: May 03
Components below the fold are clickable when using modal window
Spring security login after server reload
ZK9 internationalization java.lang.IllegalStateException
Anybody know how add label inside menupopup grid?
How to change language from menupopup column of grid?
[Announcement] ZK 9.0.1 Freshly is ready for testing
How to close the Browser Window Tab using ZK framework? [closed]