Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-770

EventQueue has extra delay if scope is SESSION

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.11
    • 5.0.10
    • None
    • None
    • ZK CE

      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>
      

            benbai benbai
            benbai benbai
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: