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

Set sortDirection to treecol will show an error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.0.10
    • 5.0.9
    • Components
    • None

      <zk>
      	<zscript><![CDATA[
      		import org.zkoss.zul.*;
      
      		
      		TreeModel model = new DefaultTreeModel(
      				new DefaultTreeNode(null, new DefaultTreeNode[] {
      		      		new DefaultTreeNode("item 0"),
      		          	new DefaultTreeNode("item 1"),
      		          	new DefaultTreeNode("item 2")
      				})
      			);
      		
      		
      		TreeitemRenderer renderer = new TreeitemRenderer() {
      		    public void render(Treeitem item, Object data) throws Exception {
      		    	TreeNode node = (TreeNode) data;
      		        item.setLabel(node.getData().toString());
      		    }
      		};
      	]]></zscript>
      	<tree width="300px" itemRenderer="${renderer}" model="${model}">
      		<custom-attributes org.zkoss.zul.tree.autoSort="true"/>
      		<treecols>
      			<treecol  label="col" sort="auto"  sortDirection="ascending" />
      		</treecols>
      	</tree>
      </zk>
      

            benbai benbai
            jimmyshiau jimmyshiau
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: