-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
6.0.0
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) { String[] userName = { "Tony", "Ryan", "Jumper", "Wing", "Sam" }; ListModelList model = new ListModelList(userName); Selectbox selBox = new Selectbox(); selBox.setModel(model); win = new Window(); win.setTitle("Hello!"); win.setClosable(true); win.appendChild(selBox); } win.setParent(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
Step 1: click on the button
Step 2: check selectbox has data. Select some value. Close the window.
Step 3: click on the button again. Window should be displayed. Check selectbox data.
Expected: Selectbox data should be as initialized with.
Actual: Selectbox data is missing.