Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2715

ListModelList.set(int, Object) triggers repaint of ALL tabs in Tabbox

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.3
    • 7.0.5, 7.0.8
    • Components
    • Security Level: Jimmy
    • ZK 8.0.3 S8

      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.

            SEFI SEFI
            Guido2406 Guido2406
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d