-
Bug
-
Resolution: Fixed
-
Normal
-
Freshly, 9.5.0, 9.0.1.2, 9.1.0
-
Security Level: Jimmy
-
ZK 9.5.1 S1
-
None
Steps to Reproduce
<zk> <zscript><![CDATA[ StepModel model = new DefaultStepModel(); model.add("AAA"); model.add("BBB"); model.add("CCC"); model.setActiveStep("BBB"); ]]></zscript> <button id="render" label="Render Stepbar"/> <div fulfill="render.onClick"> <stepbar model="${model}"/> </div> </zk>
click the button
Current Result
java.lang.IllegalStateException: UI can't be modified in the rendering phase at org.zkoss.zk.ui.impl.UiVisualizer.getAttrRespMap(UiVisualizer.java:333) at org.zkoss.zk.ui.impl.UiVisualizer.addSmartUpdate0(UiVisualizer.java:286) at org.zkoss.zk.ui.impl.UiVisualizer.addSmartUpdate(UiVisualizer.java:264) at org.zkoss.zk.ui.impl.UiEngineImpl.addSmartUpdate(UiEngineImpl.java:336) at org.zkoss.zk.ui.AbstractComponent.smartUpdate(AbstractComponent.java:1858) at org.zkoss.zk.ui.AbstractComponent.smartUpdate(AbstractComponent.java:1832) at org.zkoss.zk.ui.AbstractComponent.smartUpdate(AbstractComponent.java:1898) at org.zkoss.zkmax.zul.Step.setComplete(Step.java:99) at org.zkoss.zkmax.zul.Stepbar.updateCompleteStatus(Stepbar.java:150) at org.zkoss.zkmax.zul.Stepbar.renderProperties(Stepbar.java:523) at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:2175) ...
Expected Result
stepbar renders with active step as in StepModel
Debug Information
setComplete is called indirectly from renderProperties
the error only happens when rendered dynamically, initial page rendering works as expected (e.g. by removing the fulfill condition in the example above)
Workaround
- duplicates
-
ZK-4644 Rendering Stepbar dynamically causes error
-
- Closed
-