-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.5, 7.0.8
-
Security Level: Jimmy
-
ZK 8.0.3 S8
-
None
We use Tabbox to display collections of objects in our application. Since the Tabpanel can get quite large (forms, tables, sub-tabboxes...), we use fulfill in the template to delay zul evaluation until the tab is selected.
Now if we reload one of the object from the database and want to update the reference to it in the tabbox, we ideally want to keep the already rendered tabpanel and only rebind against the new object. We tried this by calling ListModelList.set(int, Object) on the tabbox' model. Unfortunately though, the set method throws an CONTENTS_CHANGED event. Even though it specifies the correct tab index, the tabbox then rebinds ALL tabs instead of only the affected one. This discards all tabpanels that had been fulfilled before, even if they should not be affected at all.
Using ListModelList.remove(int) (INTERVAL_REMOVED event) and ListModelList.add(int, Object) (INTERVAL_ADDED event) works better since it only throws away the affected tab, leaving the others untouched.
But still, the tabpanel has to be re-fulfilled. It would be good if ListModelList.set(int, Object) would work like this, and in addition would not cause the fulfilled tabpanel to be thrown away as well. Even if the fulfill has to be done, it would still lower the performance impact if the tabpanel template was not evaluated for all tabs, but only for the affected one.
- relates to
-
ZK-2706 Tabs are not added at the correct index
- Closed