-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Normal
-
Affects Version/s: 5.0.10
-
Component/s: None
-
None
-
Environment:
ZK CE
-
None
As code below,
an extra delay occurred if change spinner's value then click button,
<zk>
<window title="Chat" border="normal">
<zscript><![CDATA[
import org.zkoss.zk.ui.event.*;
EventQueue que = EventQueues.lookup("chat", EventQueues.SESSION, true);
que.subscribe(new EventListener() {
public void onEvent(Event evt) {
new Label(evt.getData()).setParent(inf);
}
});
void post(Button tb, int cnt) {
String text = tb.getLabel();
que.publish(new Event("onChat", null, text+" " + cnt));
}
]]></zscript>
<spinner id="pdo" value="5" />
Say <button label="send message" onClick="post(self, pdo.getValue())" />
<separator bar="true"/>
<vbox id="inf"/>
</window>
</zk>