Results 1 to 2 of 2

Thread: [CLOSED-874] Tree nested method fails when given node is first rendered

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2007
    London, UK
    Vote Rating

    Default [CLOSED-874] Tree nested method fails when given node is first rendered

    ExtJS: 3.2 final
    OS: Windows 7 Pro 64bit
    Browser: Firefox 3.2, Chrome 4, IE6

    When I create a tree and load the data with preloadChildren enabled I cannot use select() method on a node to ensure its selection if the node is nested. Using ensureVisible() does show the node, but calling select() has no effect.
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
    <html xmlns="" xml:lang="en" lang="en">
    		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    		<!-- CSS -->
    		<link rel="stylesheet" href="resources/css/ext-all.css" type="text/css" media="screen" />
    		<!-- Javascript -->
    		<script src="ext-base-debug.js" type="text/javascript"></script>
    		<script src="ext-all-debug.js" type="text/javascript"></script>
    		<script type="text/javascript">
    				// simple window to test
    				new Ext.tree.TreePanel({
    					applyTo	: Ext.getBody(),
    					width	: 150,
    					height	: 200,
    					autoScroll: true,
    					loader	: new Ext.tree.TreeLoader({
    						preloadChildren: true
    					root	: new Ext.tree.AsyncTreeNode({
    						expanded: false,
    						children: [{
    							id	: 'a',
    							text	: 'A',
    							leaf	: false,
    							children: [{
    								id	: 'b',
    								text	: 'B',
    								leaf	: false,
    								children: [{
    									id	: 'c',
    									text	: 'C',
    									leaf	: true
    					rootVisible: false,
    					listeners: {
    						afterrender : function(tree) {
    							var node = tree.getRootNode().findChild(
    								// node is NOT selected!
    		<noscript>This application requires JavaScript enabled browser.</noscript>

  2. #2
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Sydney, Australia
    Vote Rating


    You need to set clearOnLoad: false on the tree loader. Otherwise the tree node reference gets overwritten during expandPath.

    Marking as closed.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts