subscribe(listener, false)
( {@link #subscribe(EventListener,boolean)}. In other words, it subscribes a synchronous listener. Note: this method must be called within an activated exection (i.e., {@link org.zkoss.zk.ui.Executions#getCurrent} not null),no matter what scope the event queue is.
Note: the listener could access the component associated with the event ( {@link Event#getTarget}), only if this is an {@link EventQueues#DESKTOP}event queue.
An event listener can be subscribed multiple times, and it will be invoked multiple times if an event is published.
Even if this is a {@link EventQueues#GROUP}, {@link EventQueues#SESSION}, or {@link EventQueues#APPLICATION} event queue,the listener is subscribed for the current desktop only, i.e., it can only access the components belong to the subscribed desktop. If you want to use the same listener to manipulate multiple desktops, you have to subscribe them separately when the corresponding execution is available. @see #subscribe(EventListener,EventListener) @see #subscribe(EventListener,boolean)
|
|
|
|