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

dynamically added nested borderlayout triggers onBind twice

XMLWordPrintable

    • ZK 8.5.2 S1

      Steps to Reproduce

      run the attached example
      click the button (observe the logs in the browser console)

      Current Result

      "onBind" is called 2 times every time the nested added dynamically
      "onUnbind" is only called once

      Expected Result

      "onBind" called only once
      (or if technically necessary to call onBind 2x, call onUnbind also 2x)

      Unmatched onBind/onUnbind pairs make it difficult to initialize/cleanup client side libraries properly.
      The performance overhead of rendering the inner borderlayout 2x should be avoided.

      Workaround

      Surrounding the inner <borderlayout> with a <div> fixes the problem, and onBind gets only called once as expected

            klyvechen klyvechen
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified