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

EventQueue has extra delay if scope is SESSION

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.0.10
    • Fix Version/s: 5.0.11
    • Component/s: None
    • Labels:
      None
    • Environment:

      ZK CE

      Description

      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>
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: