-
Bug
-
Resolution: Fixed
-
Normal
-
6.0.2
-
None
For example,
<?page title="If nothing in the page, that is a bug"?> <?script content="zk.log('if nothing in the page, that is a bug')"?> <zk xmlns:w="http://www.zkoss.org/2005/zk/client"> <zscript><![CDATA[ import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.zkoss.lang.Threads; import org.zkoss.web.util.resource.ClassWebResource; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.http.WebManager; import org.zkoss.zk.ui.http.WpdExtendlet; import org.zkoss.zk.ui.util.GenericForwardComposer; import java.io.IOException; public class MyComposer extends GenericForwardComposer { ClassWebResource cwr; public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); cwr = WebManager.getWebManagerIfAny(comp.getDesktop().getWebApp()).getClassWebResource(); cwr.addExtendlet("wpd", new MyWpdExtendlet()); } class MyWpdExtendlet extends WpdExtendlet { public void service(HttpServletRequest request, HttpServletResponse response, String path) throws ServletException, IOException { if (path.indexOf("mesh.wpd") >= 0) { if (cwr != null) cwr.addExtendlet("wpd", new WpdExtendlet()); Threads.sleep(3000); } super.service(request, response, path); } } } ]]></zscript> <window id="mainWin" border="normal" width="800px" vflex="1" apply="MyComposer"> <custom-attributes org.zkoss.zul.image.preload="true"/> <zscript><![CDATA[ ListModel model = new FakeListModel(40); ]]></zscript> <caption label="Join ZK"> <hlayout> <label id="curr_step" value="0" /> % <progressmeter id="curr_met" value="0" width="300px" /> </hlayout> </caption> <listbox model="${model}" vflex="1"> <template name="model"> <listitem> <listcell label="${each}"/> </listitem> </template> </listbox> </window> </zk>