-
Bug
-
Resolution: Fixed
-
Major
-
8.5.1
-
Security Level: Jimmy
-
None
Steps to Reproduce
run the example with websockets enabled in zk.xml
<zk> <include id="incDefer" mode="defer" src="include1.zul"/> <button label="update include src (defer) => NPE" onClick='incDefer.setSrc("include2.zul")'/> <include id="incInstant" src="include1.zul"/> <button label="update include src (instant)" onClick='incInstant.setSrc("include2.zul")'/> </zk>
include1.zul
<zk><div>Inc 1</div></zk>
include2.zul
<zk><div>Inc 2</div></zk>
click the buttons
Current Result
updating the URL of an include in defer mode causes a NPE
Failed to load /include2.zul Cause: Unknown exception: java.lang.NullPointerException. java.lang.NullPointerException at org.eclipse.jetty.server.Dispatcher.include(Dispatcher.java:99) at org.zkoss.web.servlet.Servlets.include(Servlets.java:975) at org.zkoss.zk.ui.http.ExecutionImpl.include(ExecutionImpl.java:204) at org.zkoss.zul.Include.include(Include.java:681) at org.zkoss.zul.Include.renderProperties(Include.java:628) at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:2159) ...
Expected Result
working include
Workaround
avoid defer mode with includes
OR
use <apply templateURI="...">
OR
call Executions.createComponents(...) directly
- relates to
-
ZK-3847 Include invalidate cause an NPE when WebSocket is enabled
- Closed