<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Opening nodes in a Flex Tree control using the expandItem() method</title>
	<atom:link href="http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kokumo</title>
		<link>http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/comment-page-1/#comment-10041</link>
		<dc:creator>Kokumo</dc:creator>
		<pubDate>Wed, 12 Oct 2011 20:38:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/#comment-10041</guid>
		<description>Thanks a lottt!!!... you save my day =)</description>
		<content:encoded><![CDATA[<p>Thanks a lottt!!!&#8230; you save my day =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimbo Jones</title>
		<link>http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/comment-page-1/#comment-8798</link>
		<dc:creator>Jimbo Jones</dc:creator>
		<pubDate>Tue, 04 Jan 2011 15:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/#comment-8798</guid>
		<description>Absolutely Brilliant ... thank you so much</description>
		<content:encoded><![CDATA[<p>Absolutely Brilliant &#8230; thank you so much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolas</title>
		<link>http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/comment-page-1/#comment-6408</link>
		<dc:creator>Nicolas</dc:creator>
		<pubDate>Thu, 19 Nov 2009 23:15:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/#comment-6408</guid>
		<description>How do you lock a node in the open or closed position?</description>
		<content:encoded><![CDATA[<p>How do you lock a node in the open or closed position?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/comment-page-1/#comment-2039</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Fri, 12 Jun 2009 15:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/#comment-2039</guid>
		<description>Thanks for the example, but there&#039;s another issue with this code that I&#039;d like to bring up. If you go into the tree and expand nodes all the way down to the leaf, then close the &quot;main&quot; parent node and THEN try your code to expandParents it will not work.

The reason is because subnodes have the property isOpen set to true because you only closed their &quot;main&quot; node, but not each of the subnodes. Does that make sense?

The fix is very easy. Just need one more case in the recursion:

else if(node){epandParents(node.parent();)}

This will ensure that the recursion will reach all the way up to the root node and expand that if that&#039;s the only one you closed.

Besides that one little issue the code is awesome and thanks for the example!</description>
		<content:encoded><![CDATA[<p>Thanks for the example, but there&#8217;s another issue with this code that I&#8217;d like to bring up. If you go into the tree and expand nodes all the way down to the leaf, then close the &#8220;main&#8221; parent node and THEN try your code to expandParents it will not work.</p>
<p>The reason is because subnodes have the property isOpen set to true because you only closed their &#8220;main&#8221; node, but not each of the subnodes. Does that make sense?</p>
<p>The fix is very easy. Just need one more case in the recursion:</p>
<p>else if(node){epandParents(node.parent();)}</p>
<p>This will ensure that the recursion will reach all the way up to the root node and expand that if that&#8217;s the only one you closed.</p>
<p>Besides that one little issue the code is awesome and thanks for the example!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jaron</title>
		<link>http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/comment-page-1/#comment-2038</link>
		<dc:creator>Jaron</dc:creator>
		<pubDate>Wed, 14 May 2008 03:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/#comment-2038</guid>
		<description>Cheers Buddy! I had been mucking around with expandItem() for a few hours and did not realize the tree will not &quot;auto expand&quot; you have to do it manually so thanks for that you just saved me another hour or so of mucking around (=</description>
		<content:encoded><![CDATA[<p>Cheers Buddy! I had been mucking around with expandItem() for a few hours and did not realize the tree will not &#8220;auto expand&#8221; you have to do it manually so thanks for that you just saved me another hour or so of mucking around (=</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/comment-page-1/#comment-2037</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Tue, 26 Feb 2008 19:25:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/#comment-2037</guid>
		<description>A user on FlexCoders (http://tech.groups.yahoo.com/group/flexcoders/) was asking if you could use a Tree as a ComboBox dropdown. I cheated a little and just used the PopUpButton control instead, but for more information, see &lt;a href=&quot;http://blog.flexexamples.com/2008/02/26/displaying-a-tree-control-as-a-pop-up-for-a-flex-popupbutton-control/&quot; rel=&quot;nofollow&quot;&gt;&quot;Displaying a Tree control as a pop up for a Flex PopUpButton control&quot;&lt;/a&gt;.

Peter</description>
		<content:encoded><![CDATA[<p>A user on FlexCoders (<a href="http://tech.groups.yahoo.com/group/flexcoders/" rel="nofollow">http://tech.groups.yahoo.com/group/flexcoders/</a>) was asking if you could use a Tree as a ComboBox dropdown. I cheated a little and just used the PopUpButton control instead, but for more information, see <a href="http://blog.flexexamples.com/2008/02/26/displaying-a-tree-control-as-a-pop-up-for-a-flex-popupbutton-control/" rel="nofollow">&#8220;Displaying a Tree control as a pop up for a Flex PopUpButton control&#8221;</a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cato</title>
		<link>http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/comment-page-1/#comment-2036</link>
		<dc:creator>Cato</dc:creator>
		<pubDate>Thu, 20 Dec 2007 10:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/#comment-2036</guid>
		<description>Hi, how do we do it with an ArrayColletion as the dataprovider?</description>
		<content:encoded><![CDATA[<p>Hi, how do we do it with an ArrayColletion as the dataprovider?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/comment-page-1/#comment-2035</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Fri, 30 Nov 2007 05:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/#comment-2035</guid>
		<description>By the way, there is a bug in the previous example. For cities that have multiple teams (Los Angeles, Chicago, New York) the first matching city is always returned. Sorry, I should have given each team a more unique ID than just a city name.

Peter</description>
		<content:encoded><![CDATA[<p>By the way, there is a bug in the previous example. For cities that have multiple teams (Los Angeles, Chicago, New York) the first matching city is always returned. Sorry, I should have given each team a more unique ID than just a city name.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>

