<?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: Up a Tree Without a Paddle (and Down Again)</title>
	<atom:link href="http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/feed/" rel="self" type="application/rss+xml" />
	<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 13 Aug 2010 18:04:58 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: joe</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-35</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Wed, 29 Oct 2008 00:09:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-35</guid>
		<description>I would always lean towards implement ITreeDataDescriptor because it is a much simpler job than implementing ICollectionView and IViewCursor which have more complex interfaces.  Obviously if you already have ICollectionViews on hand, you&#039;re all set.  But many value objects for which trees need to be displayed are not built out of ICollectionViews -- often the choice of value object implementation is driven by other considerations.</description>
		<content:encoded><![CDATA[<p>I would always lean towards implement ITreeDataDescriptor because it is a much simpler job than implementing ICollectionView and IViewCursor which have more complex interfaces.  Obviously if you already have ICollectionViews on hand, you&#8217;re all set.  But many value objects for which trees need to be displayed are not built out of ICollectionViews &#8212; often the choice of value object implementation is driven by other considerations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noah V</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-36</link>
		<dc:creator>Noah V</dc:creator>
		<pubDate>Tue, 28 Oct 2008 19:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-36</guid>
		<description>Scratch that - guess I shouldn&#039;t have skimmed - my question is different now.  Did you consider implementing ICollectionView/IviewCursor instead of ITreeDataDescriptor?  What was your reasoning, if so?</description>
		<content:encoded><![CDATA[<p>Scratch that &#8211; guess I shouldn&#8217;t have skimmed &#8211; my question is different now.  Did you consider implementing ICollectionView/IviewCursor instead of ITreeDataDescriptor?  What was your reasoning, if so?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noah V</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-37</link>
		<dc:creator>Noah V</dc:creator>
		<pubDate>Tue, 28 Oct 2008 19:05:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-37</guid>
		<description>Hi Joe,

Just wanted to confirm that you were able to implement your own ICollectionView/IViewCursor in the end.  Also, I&#039;m curious if you know how much progress Adobe has made in cleaning up the issues you ran into above.

Thanks,
Noah V</description>
		<content:encoded><![CDATA[<p>Hi Joe,</p>
<p>Just wanted to confirm that you were able to implement your own ICollectionView/IViewCursor in the end.  Also, I&#8217;m curious if you know how much progress Adobe has made in cleaning up the issues you ran into above.</p>
<p>Thanks,<br />
Noah V</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SIyer</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-34</link>
		<dc:creator>SIyer</dc:creator>
		<pubDate>Wed, 13 Jun 2007 11:51:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-34</guid>
		<description>A good and clear post on dynamic tree loading. Though I see this has been written almost a year ago, I don&#039;t find any official documentation from Adobe on dynamic tree loading even today. This gives me a feel that though all the videos and tutorials make flex development appear like a childs play, it will be sometime before we can build truly enterprise class applications using Flex.</description>
		<content:encoded><![CDATA[<p>A good and clear post on dynamic tree loading. Though I see this has been written almost a year ago, I don&#8217;t find any official documentation from Adobe on dynamic tree loading even today. This gives me a feel that though all the videos and tutorials make flex development appear like a childs play, it will be sometime before we can build truly enterprise class applications using Flex.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-33</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 08 Nov 2006 23:45:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-33</guid>
		<description>Thanks for you help.  I took your advice and now it is working great.   I made my collections inherit from ArrayCollections (rather than Array) and returned them directly.  As I understand it the ArrayCollections are basically wrappers around Arrays that are given the additional responsibility of broadcating events when the underlying array is altered.  The tree must be making use of these events for its internal bookkeeping.   Thanks again!

  I owe you one!</description>
		<content:encoded><![CDATA[<p>Thanks for you help.  I took your advice and now it is working great.   I made my collections inherit from ArrayCollections (rather than Array) and returned them directly.  As I understand it the ArrayCollections are basically wrappers around Arrays that are given the additional responsibility of broadcating events when the underlying array is altered.  The tree must be making use of these events for its internal bookkeeping.   Thanks again!</p>
<p>  I owe you one!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-32</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Wed, 01 Nov 2006 11:30:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-32</guid>
		<description>Michael, I can&#039;t post our entire ITreeDataDescriptor class source because it has content that&#039;s proprietary to Allurent.  I wrote this article in order to convey the exact sense of what we were doing, without actually sharing the code.

One problem I see off the bat is that your code doesn&#039;t apply &quot;Rule 2: Always return the same identical object from a call to getChildren() for a given value of the node argument.&quot;  Because you&#039;re calling new ArrayCollection() every time, this would tend to throw off the bookkeeping inside Tree.

It would be easier for you if the collections inside your nodes (.circulars, .pages, etc.) were already instances of ArrayCollection.  Then you wouldn&#039;t have to wrap them in anything.

You weren&#039;t specific about what &quot;previously loaded&quot; data meant, but the other thing I&#039;d do is make absolutely sure that the events that fire when your loading operation completes are passing back the correct, newly loaded data set.  There might be a problem in there somewhere.  That&#039;s beyond the scope of what I could help with though.</description>
		<content:encoded><![CDATA[<p>Michael, I can&#8217;t post our entire ITreeDataDescriptor class source because it has content that&#8217;s proprietary to Allurent.  I wrote this article in order to convey the exact sense of what we were doing, without actually sharing the code.</p>
<p>One problem I see off the bat is that your code doesn&#8217;t apply &#8220;Rule 2: Always return the same identical object from a call to getChildren() for a given value of the node argument.&#8221;  Because you&#8217;re calling new ArrayCollection() every time, this would tend to throw off the bookkeeping inside Tree.</p>
<p>It would be easier for you if the collections inside your nodes (.circulars, .pages, etc.) were already instances of ArrayCollection.  Then you wouldn&#8217;t have to wrap them in anything.</p>
<p>You weren&#8217;t specific about what &#8220;previously loaded&#8221; data meant, but the other thing I&#8217;d do is make absolutely sure that the events that fire when your loading operation completes are passing back the correct, newly loaded data set.  There might be a problem in there somewhere.  That&#8217;s beyond the scope of what I could help with though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-31</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 01 Nov 2006 01:25:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-31</guid>
		<description>Hey Joe ...
  First off, thanks for posting info on this.   I have been trying for 2 days create a tree that loads on demand.  I am really struggling.  I would really appreciate it if you would post your ITreeDataDescriptor Class.  I am going to post mine below.   The first time I open a dynamic branch it works perfectly.  The 2nd through N times all open branches show the data retrieved on the last call.. make sence?   Thanks for the time and attention!!   I hope to return the favor one day!

	public function getChildren(node:Object, model:Object=null):ICollectionView
	{
 		if (node is EnvironmentVO)
 			return ICollectionView(new ArrayCollection(EnvironmentVO(node).circulars));
		if (node is CircularVO)
			return ICollectionView(new ArrayCollection(CircularVO(node).pages));
		if (node is PageVO)
			return ICollectionView(new ArrayCollection(PageVO(node).items));
		return null;
	}
	public function hasChildren(node:Object, model:Object=null):Boolean
	{
		if (node is EnvironmentVO) return true;
		if (node is CircularVO)
		{
			if (CircularVO(node).pages.length==0){
				CircularVO(node).pages.push(new PageVO({name:&#039;loading&#039;}));
				var cmd:CmdEvent = new CmdEvent(Controller.EVENT_DataLoadPageList);
				cmd.data = CircularVO(node);
				Controller.getInstance().executeCommand(cmd);
				return false;
			}else if (CircularVO(node).pages.length==1){
				if (PageVO(CircularVO(node).pages[0]).name==&quot;loading&quot;)
				return false;
			}
			return true;
		}
		if (node is PageVO) return true;  // Got To Get The Top Level Working First!!
		if (node is ItemVO) return false;
		return false;
	}
	public function isBranch(node:Object, model:Object=null):Boolean
	{
		if (node is EnvironmentVO) return true;
		if (node is CircularVO) return true;
		if (node is PageVO) return true;
		if (node is ItemVO) return false;
		return false;
	}</description>
		<content:encoded><![CDATA[<p>Hey Joe &#8230;<br />
  First off, thanks for posting info on this.   I have been trying for 2 days create a tree that loads on demand.  I am really struggling.  I would really appreciate it if you would post your ITreeDataDescriptor Class.  I am going to post mine below.   The first time I open a dynamic branch it works perfectly.  The 2nd through N times all open branches show the data retrieved on the last call.. make sence?   Thanks for the time and attention!!   I hope to return the favor one day!</p>
<p>	public function getChildren(node:Object, model:Object=null):ICollectionView<br />
	{<br />
 		if (node is EnvironmentVO)<br />
 			return ICollectionView(new ArrayCollection(EnvironmentVO(node).circulars));<br />
		if (node is CircularVO)<br />
			return ICollectionView(new ArrayCollection(CircularVO(node).pages));<br />
		if (node is PageVO)<br />
			return ICollectionView(new ArrayCollection(PageVO(node).items));<br />
		return null;<br />
	}<br />
	public function hasChildren(node:Object, model:Object=null):Boolean<br />
	{<br />
		if (node is EnvironmentVO) return true;<br />
		if (node is CircularVO)<br />
		{<br />
			if (CircularVO(node).pages.length==0){<br />
				CircularVO(node).pages.push(new PageVO({name:&#8217;loading&#8217;}));<br />
				var cmd:CmdEvent = new CmdEvent(Controller.EVENT_DataLoadPageList);<br />
				cmd.data = CircularVO(node);<br />
				Controller.getInstance().executeCommand(cmd);<br />
				return false;<br />
			}else if (CircularVO(node).pages.length==1){<br />
				if (PageVO(CircularVO(node).pages[0]).name==&#8221;loading&#8221;)<br />
				return false;<br />
			}<br />
			return true;<br />
		}<br />
		if (node is PageVO) return true;  // Got To Get The Top Level Working First!!<br />
		if (node is ItemVO) return false;<br />
		return false;<br />
	}<br />
	public function isBranch(node:Object, model:Object=null):Boolean<br />
	{<br />
		if (node is EnvironmentVO) return true;<br />
		if (node is CircularVO) return true;<br />
		if (node is PageVO) return true;<br />
		if (node is ItemVO) return false;<br />
		return false;<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ozren</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-30</link>
		<dc:creator>Ozren</dc:creator>
		<pubDate>Wed, 18 Oct 2006 21:31:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-30</guid>
		<description>Hello all,

I am trying to create a dinamic tree, but i just can get it to work. Can someone please post the code here, not everything but just the way i can handle results and insert them to my tree component. Btw, i got it to work with addChildAt, but it works if my result only has one XML row like &quot;&quot;.

thx in advanced</description>
		<content:encoded><![CDATA[<p>Hello all,</p>
<p>I am trying to create a dinamic tree, but i just can get it to work. Can someone please post the code here, not everything but just the way i can handle results and insert them to my tree component. Btw, i got it to work with addChildAt, but it works if my result only has one XML row like &#8220;&#8221;.</p>
<p>thx in advanced</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Kurth</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-29</link>
		<dc:creator>Benjamin Kurth</dc:creator>
		<pubDate>Fri, 15 Sep 2006 19:40:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-29</guid>
		<description>Many thanks to Marcel Fahle for the dummy &quot;...loading&quot; node technique - this did the trick for me.

I did have to add a call to invalidateList() to get the expanded branch to refresh the display, revealing the newly added node(s):

Tree(event.target).dataDescriptor.addChildAt(selectedResultNode,{label:&quot;item1 child&quot;},0);
		Tree(event.target).invalidateList();</description>
		<content:encoded><![CDATA[<p>Many thanks to Marcel Fahle for the dummy &#8220;&#8230;loading&#8221; node technique &#8211; this did the trick for me.</p>
<p>I did have to add a call to invalidateList() to get the expanded branch to refresh the display, revealing the newly added node(s):</p>
<p>Tree(event.target).dataDescriptor.addChildAt(selectedResultNode,{label:&#8221;item1 child&#8221;},0);<br />
		Tree(event.target).invalidateList();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://joeberkovitz.com/blog/2006/06/21/up-a-tree-without-a-paddle-and-down-again/comment-page-1/#comment-28</link>
		<dc:creator>joe</dc:creator>
		<pubDate>Tue, 29 Aug 2006 11:31:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeberkovitz.com/blog/?p=16#comment-28</guid>
		<description>Glad that worked for you, Marcel.  I think you understood the approach.

You are using XMLListCollection, and we are using an ArrayCollection (or something like it).  Perhaps that explains why you need your &quot;lonely node&quot; for the tree to work correctly.  We didn&#039;t seem to need such a node.

There are still some bugs in Tree that can occur when scrolling around as data is added.  Overall it is still in a delicate condition and I don&#039;t think this control is completely solid yet.</description>
		<content:encoded><![CDATA[<p>Glad that worked for you, Marcel.  I think you understood the approach.</p>
<p>You are using XMLListCollection, and we are using an ArrayCollection (or something like it).  Perhaps that explains why you need your &#8220;lonely node&#8221; for the tree to work correctly.  We didn&#8217;t seem to need such a node.</p>
<p>There are still some bugs in Tree that can occur when scrolling around as data is added.  Overall it is still in a delicate condition and I don&#8217;t think this control is completely solid yet.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

