-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Affects Version/s: 10.0.0, 9.6.4
-
Component/s: None
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
- Run attached fullfil.zul
- Click "add dynamic item" 3 times
- click "clear model" once
- click "render all"
Current Result
onFullfill events trigger on the removed components.
each component onFullfil is triggered (1 + number of syncModel called after being added) timesĀ
Expected Result
onFullfill doesn't trigger for removed components
onFullfill is called once per component which hold the listener
Debug Information
- org.zkoss.zk.ui.impl.UiEngineImpl.TemplateImpl.create(Component, Component, VariableResolver, Composer) is called on each of the items currently in the model everytime org.zkoss.zuti.zul.ForEachListDataListener.onChange(ListDataEvent) is triggered by adding new elements in the model.
- This triggers org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(CreateInfo, NodeInfo, Component, Component) which adds new Fullfill listeners for every existing component, even those who already have a fullfill listener.
- Both issues should be solved by clearing fullfill listeners when the content of the shadow templates are destroyed and recreated during modelSync
- is duplicated by
-
ZK-5559 Shadow Component ForEach adds fullfil listeners everytime the syncModel method is called, doesn't clear them if component is removed
-
- Closed
-