-
Bug
-
Resolution: Fixed
-
Normal
-
5.0.10
EventQueue in Group scope will have NPE in the following condition.
index.zul
<zk> <zscript> EventQueue que = EventQueues.lookup("iframe", "group", true); void publish() { String text = tbx.getValue(); que.publish(new Event("onGroupTest", null, text)); } </zscript> <vlayout> <iframe width="400px" height="600px" src="iframe.zul" /> <div> Please type some words into the textbox and then you should see NPE exception. <textbox id="tbx" onChange="publish()"/> </div> </vlayout> </zk>
iframe.zul
<zk> <window title="Iframe" border="normal" width="300px"> <zscript> EventQueue que = EventQueues.lookup("iframe", "group", true); que.subscribe(new EventListener() { public void onEvent(Event evt) { lbl.setValue((String)evt.getData()); } }); </zscript> <textbox id="lbl" value="This is Iframe" /> </window> </zk>