-
Bug
-
Resolution: Won't Fix
-
Normal
-
None
-
6.0.0, Freshly
-
ZK 6
Test case
<zk> <zscript> <![CDATA[ //@IMPORT import org.zkoss.zk.ui.event.EventListener; ]]> <![CDATA[ //@DECLARATION Window win = null; public class MyListener implements EventListener{ public void onEvent(Event evt) throws Exception{ if (win ==null) { win = new Window(); win.setTitle("Hello!"); win.setClosable(true); Label testLabel = new Label("My Label"); testLabel.setStubonly("true"); win.appendChild(testLabel); } win.setParent(evt.getTarget().getFellow("mainWindow")); win.doModal(); } } ]]> </zscript> <window id="mainWindow"> <button>Click me! <attribute name="onCreate"> self.addEventListener("onClick", new MyListener(){}); </attribute> </button> </window> </zk>
Steps to reproduce:
1. Click on button. Modal window containing label is displayed
2. Close the window
3. Click on the button again to open window.
Expected: Window with label is displayed correctly.
Actual: JS error "Failed to mount stub XXXX" is shown
Notice: it works fine on ZK 5.