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

Tree close/open icon is not correct after calling clearOpen and reopen a node

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.5.1
    • Fix Version/s: 6.5.2
    • Component/s: Components
    • Labels:
      None

      Description

      <zk>
      	<zscript><![CDATA[
      	
      	DefaultTreeNode r = new DefaultTreeNode("root",new ArrayList());
      	DefaultTreeNode n1 = new DefaultTreeNode("Node 1",new ArrayList());
      	DefaultTreeNode n2 = new DefaultTreeNode("Node 2",new ArrayList());
      	DefaultTreeNode n3 = new DefaultTreeNode("Node 3",new ArrayList());
      	DefaultTreeNode n4 = new DefaultTreeNode("Node 4");
      	
      	
      	r.add(n1);
      	n1.add(n2);
      	n2.add(n3);
      	n3.add(n4);
      	           
      	DefaultTreeModel model = new DefaultTreeModel(r);
      	model.addOpenObject(n1);
      	model.addOpenObject(n2);
      	model.addOpenObject(n3);
      	
      ]]></zscript>
      	<label multiline="true">
      		1.click close
      		2.click Node1 open icon to open it
      		3.you should see the Node2 is closed, and with a close icon, if bug is not fixed, you will see Node2 is closed, but has a open icon
      	</label>
      	<button label="close" onClick='model.clearOpen()'/>
      	<tree model="${model}">
      		<treecols visible="false">
      			<treecol label="Unit"></treecol>
      		</treecols>
      		<template name="model">
      			<treeitem>
      				<treerow>
      					<treecell label="${each.data}"/>
      				</treerow>
      			</treeitem>
      		</template>
      	</tree>
      </zk>
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jumperchen jumperchen
                Reporter:
                dennis dennis
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: