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

tree items cause JS error with radiogroup

XMLWordPrintable

    • ZK 8.6.0 S1
    • None

      Steps to Reproduce

      run the attachment radiogroup-rerender-simplified.zul

      click in the following sequence
      1. "refresh tree"
      2. "rerender radio group"
      3. "refresh tree"
      4. "rerender radio group"

      Current Result

      after 2nd time refreshing the tree, it is no longer possible to re-render the radio group resulting in a JS error:

      zk.wpd:35294 Uncaught TypeError: group.getName is not a function
          at init.getName (zk.wpd:35294)
          at init.contentAttrs_ (zk.wpd:34178)
          at init.radio$mold$ (zk.wpd:35351)
          at init.redraw (zk.wpd:20252)
          at init.radiogroup$mold$ (zk.wpd:35613)
          at init.redraw (zk.wpd:20252)
          at init.redrawHTML_ (zk.wpd:20630)
          at init.insertChildHTML_ (zk.wpd:20740)
          at init.appendChild (zk.wpd:19468)
          at Array.fn (zk.wpd:27091)
      

      Expected Result

      re-rendering the radio group

      Debug Info

      this only happens when "org.zkoss.zul.client.rod" is enabled for the tree
      this still worked in 8.5.0

      Root Cause

      when debugging through the JS code the radio._group refers to a Treeitem-widget instead of a Radiogroup

      Workaround

      disable client-rod for the tree

      	<tree id="tree" model="${treeModel}">
      		<custom-attributes org.zkoss.zul.client.rod="false"/>
      	</tree>
      

            rudyhuang rudyhuang
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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