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

orgitem and orgnode trigger bind / unbind even if not in the dom, cause errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 8.6.0
    • 8.6.0
    • None
    • Security Level: Jean
    • None

    Description

      Steps to Reproduce

      Run following zul:

      <zk>
      	<organigram width="600px">
      	    <orgchildren>
      	        <orgitem label="Item1">
      	            <orgchildren>
      	                <orgitem>
      	                	<orgnode label="Item2">
      	                		<textbox/>
      	                	</orgnode>
      	                </orgitem>
                      </orgchildren>
      	        </orgitem>
      	    </orgchildren>
      	</organigram>
      </zk>
      

      close the item1 node

      Current Result

      textbox is unbound, then organigram triggers renrender and tries to bind textbox without a dom node.

      Expected Result

      lifecyle should prevent binding / unbinding of nodes not existing in dom

      Debug Info

      Uncaught TypeError: Cannot read property 'value' of undefined
      at init.bind_ (zul.inp.wpd:formatted:906)
      at init.bindChildren_ (zk.wpd:21173)
      at init.bind_ (zk.wpd:21136)
      at init.bindChildren_ (zk.wpd:21173)
      at init.bind_ (zk.wpd:21136)
      at init.$supers (zk.wpd:11786)
      at init.bind_ (zkmax.layout.wpd:formatted:5369)
      at init.bindChildren_ (zk.wpd:21173)
      at init.bind_ (zk.wpd:21136)
      at init.bindChildren_ (zk.wpd:21173)
      bind_ @ zul.inp.wpd:formatted:906
      bindChildren_ @ zk.wpd:21173
      bind_ @ zk.wpd:21136
      bindChildren_ @ zk.wpd:21173
      bind_ @ zk.wpd:21136
      $supers @ zk.wpd:11786
      bind_ @ zkmax.layout.wpd:formatted:5369
      bindChildren_ @ zk.wpd:21173
      bind_ @ zk.wpd:21136
      bindChildren_ @ zk.wpd:21173
      bind_ @ zk.wpd:21136
      $supers @ zk.wpd:11786
      bind_ @ zkmax.layout.wpd:formatted:5369
      bind @ zk.wpd:21054
      replaceChildHTML_ @ zk.wpd:20785
      replaceHTML @ zk.wpd:20628
      rerender @ zk.wpd:20748
      _rerender0 @ zk.wpd:18562
      setTimeout (async)
      _rerender @ zk.wpd:18546
      rerender @ zk.wpd:20717
      open @ zkmax.layout.wpd:formatted:5354
      (anonymous) @ zk.wpd:10071
      _toggleOpen @ zkmax.layout.wpd:formatted:5394
      doSelect_ @ zkmax.layout.wpd:formatted:5455
      _doEvt @ zk.wpd:24969
      (anonymous) @ zk.wpd:25169
      dispatch @ zk.wpd:5286
      elemData.handle @ zk.wpd:4957

      Root Cause

      Workaround

      Attachments

        Activity

          People

            CharlesQiu CharlesQiu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 5 hours Remaining Estimate - 3 hours
                3h
                Logged:
                Time Spent - 5 hours Remaining Estimate - 3 hours
                5h