<?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: Maintaining state on Tree Component while updating remote data</title>
	<atom:link href="http://enestrom.com/20090312/maintaining-state-on-tree-component-while-updating-remote-data/feed/" rel="self" type="application/rss+xml" />
	<link>http://enestrom.com/20090312/maintaining-state-on-tree-component-while-updating-remote-data/</link>
	<description>Keep It Simply Stupid</description>
	<lastBuildDate>Fri, 10 Jun 2011 09:36:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Peter Kaptein</title>
		<link>http://enestrom.com/20090312/maintaining-state-on-tree-component-while-updating-remote-data/#comment-35</link>
		<dc:creator>Peter Kaptein</dc:creator>
		<pubDate>Sun, 29 Aug 2010 17:01:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enestrom.com/?p=80#comment-35</guid>
		<description>Hi all,

For a Project with BlazeDS I had to work with updating and reloading Tree component data without breaking the User Experience (all nodes closed when data reloaded).
Instead of keeping tabs on “which node was opened before?” and “what was the scroll-position?” I found a way to inject the new state of the Tree component data into the existing data provider.

See article here if you are interested.
BlazeDS and Smooth Data Injection – Reloading the Tree View Data Provider without breaking the User Experience – http://bit.ly/92h7on

Hope this is of help as well.</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>For a Project with BlazeDS I had to work with updating and reloading Tree component data without breaking the User Experience (all nodes closed when data reloaded).<br />
Instead of keeping tabs on “which node was opened before?” and “what was the scroll-position?” I found a way to inject the new state of the Tree component data into the existing data provider.</p>
<p>See article here if you are interested.<br />
BlazeDS and Smooth Data Injection – Reloading the Tree View Data Provider without breaking the User Experience – <a href="http://bit.ly/92h7on" rel="nofollow">http://bit.ly/92h7on</a></p>
<p>Hope this is of help as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Eneström</title>
		<link>http://enestrom.com/20090312/maintaining-state-on-tree-component-while-updating-remote-data/#comment-34</link>
		<dc:creator>Daniel Eneström</dc:creator>
		<pubDate>Mon, 01 Jun 2009 08:58:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enestrom.com/?p=80#comment-34</guid>
		<description>I have no sample code at the moment, but a side note is that this method only works with array collections and not with XML. My guess at the reason being that using an XML-file the UID-property it searches for would actually behave as &quot;@uid&quot; in an XML node.

My trick to using array collections is a custom made PHP class that while transmitted through AMFPHP behaves as a native array collection, instead of an array.

When I create the array tree in PHP, before passing it to Flex, I convert each array node to ArrayCollection using this class:

&lt;pre lang=&quot;php&quot;&gt;
class ArrayCollection {
	var $_explicitType = &quot;flex.messaging.io.ArrayCollection&quot;;
	var $source = array();
	
	function ArrayCollection( $array )
	{
		if( !isset( $array ) )
		{
			$array = array();
		}
		$this-&gt;source = $array;
	}
}
&lt;/pre&gt;

Usage would thus be: 
$node = new ArrayCollection( $myarray );

Hope this helps.</description>
		<content:encoded><![CDATA[<p>I have no sample code at the moment, but a side note is that this method only works with array collections and not with XML. My guess at the reason being that using an XML-file the UID-property it searches for would actually behave as &#8220;@uid&#8221; in an XML node.</p>
<p>My trick to using array collections is a custom made PHP class that while transmitted through AMFPHP behaves as a native array collection, instead of an array.</p>
<p>When I create the array tree in PHP, before passing it to Flex, I convert each array node to ArrayCollection using this class:</p>
<pre lang="php">
class ArrayCollection {
	var $_explicitType = "flex.messaging.io.ArrayCollection";
	var $source = array();

	function ArrayCollection( $array )
	{
		if( !isset( $array ) )
		{
			$array = array();
		}
		$this->source = $array;
	}
}
</pre>
<p>Usage would thus be:<br />
$node = new ArrayCollection( $myarray );</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ThaStyle</title>
		<link>http://enestrom.com/20090312/maintaining-state-on-tree-component-while-updating-remote-data/#comment-33</link>
		<dc:creator>ThaStyle</dc:creator>
		<pubDate>Mon, 01 Jun 2009 08:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.enestrom.com/?p=80#comment-33</guid>
		<description>Great i stumpled on this issue, indeed the other bypasses are alot more complicated, better to store the uids, do you happen to have some sample code ??
would be deeply apreciated... and do you send raw xml or array collections, and how do you optain levels??
i worked on something that had 3 static depth levels, but would like a real recursive solution, thanks again...
Peter</description>
		<content:encoded><![CDATA[<p>Great i stumpled on this issue, indeed the other bypasses are alot more complicated, better to store the uids, do you happen to have some sample code ??<br />
would be deeply apreciated&#8230; and do you send raw xml or array collections, and how do you optain levels??<br />
i worked on something that had 3 static depth levels, but would like a real recursive solution, thanks again&#8230;<br />
Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>

