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

The scroll position shall not goto top when call focus after invalidate()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.0.0, 5.0.11
    • 5.0.10, 6.0.0
    • Components
    • Security Level: Jimmy
    • None
    • None

      <zk>
      	<zscript><![CDATA[
      		List list = new ArrayList();
      		for (int i = 0; i < 100; i++) {
      			List list2 = new ArrayList();
      			
      			for (int j = 0; j < 50; j++) {
      				list2.add(new DefaultTreeNode("item " + i + j));
      			}
      			list.add(new DefaultTreeNode("item " + i, list2));
      		}
      		DefaultTreeModel model =  
      			new DefaultTreeModel(new DefaultTreeNode(null, list));
      		
      		TreeitemRenderer render = new TreeitemRenderer() {
      			public void render(Treeitem item, Object data) throws Exception {
      				Treerow tr;
      				if (item.getTreerow() == null) {
      					tr = new Treerow();
      					tr.setParent(item);
      				} else {
      					tr = item.getTreerow();
      					tr.getChildren().clear();
      				}
      				tr.appendChild(new Treecell((String) ((DefaultTreeNode) data).getData()));
      				item.setValue(data);
      			}
      		};
      	]]></zscript>
      	
      	<tree model="${model}" itemRenderer="${render }" mold="paging" pageSize="50">
      		<treecols>
      			<treecol label="col"/>
      		</treecols>
      	</tree>
      </zk>
      

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

              Created:
              Updated:
              Resolved: