<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: I found this great actionscript class component:</title>
	<link>http://www.waldosmeets.com/2003/06/23/289/</link>
	<description>Sales Engineer from Adobe Benelux on Rich Internet Applications, Web 2.0 and Adobe Flex in the Benelux.</description>
	<pubDate>Sun, 07 Sep 2008 18:54:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>

	<item>
		<title>By: Yadviga</title>
		<link>http://www.waldosmeets.com/2003/06/23/289/#comment-165</link>
		<author>Yadviga</author>
		<pubDate>Sat, 08 May 2004 16:50:25 +0000</pubDate>
		<guid>http://www.waldosmeets.com/2003/06/23/289/#comment-165</guid>
					<description>I am trying to recreate this example with CF/MSAccess instead of PHP. But I get only Root note displayed. Any idea why this might happen ?

1. Code in FLA:
function Result() {
	this.onResult = function(rs) {
		var _frst = new FRSTreeClass(rs);
		//_frst.traceTree();
		var rootNode = _frst.toFUITreeNode();
		rootNode.setIsOpen(1);
		_root.my_tree.setRootNode(rootNode);
	};
	this.onStatus = function(error) {
		for (var i in error) {
			trace(i+":"+error[i]+"
");
			_root.out += i+":"+error[i]+"
";
		}
	};
}

_global.cfServer = NetServices.createGatewayConnection();
var server = cfServer.getService("CM_access.ExampleService", new Result());
		
//call a method
server.getTree();


2. code in CFC:
&lt;cfcomponent name="ExampleService" &gt;
	&lt;cffunction name="getTree" access="remote" returnType="query"&gt;
		&lt;cfquery name="rsGetParts" datasource="CM33" &gt;
			SELECT table_id, parent_table_id, table_display_name
			FROM tree
		&lt;/cfquery&gt;
		&lt;cfreturn rsGetParts&gt;
	&lt;/cffunction&gt;	
&lt;/cfcomponent&gt;


3. Changes made in FRSTree.as 

p.idField = "table_id";

/**
	@property parentIDField [string] the field (columnName) in the RecordSet indicating the uniqueID of parent
	change this according to your dataBase design
*/

p.parentIDField = "parent_table_id";

/**
	@property labelField [string] the field (columnName) in the RecordSet indicating the label 
	change this according to your dataBase design
*/
p.labelField = "table_display_name";


Thanks,
Yadviga</description>
		<content:encoded><![CDATA[<p>I am trying to recreate this example with CF/MSAccess instead of PHP. But I get only Root note displayed. Any idea why this might happen ?</p>
<p>1. Code in FLA:<br />
function Result() {<br />
	this.onResult = function(rs) {<br />
		var _frst = new FRSTreeClass(rs);<br />
		//_frst.traceTree();<br />
		var rootNode = _frst.toFUITreeNode();<br />
		rootNode.setIsOpen(1);<br />
		_root.my_tree.setRootNode(rootNode);<br />
	};<br />
	this.onStatus = function(error) {<br />
		for (var i in error) {<br />
			trace(i+&#8221;:&#8221;+error[i]+&#8221;<br />
&#8220;);<br />
			_root.out += i+&#8221;:&#8221;+error[i]+&#8221;<br />
&#8220;;<br />
		}<br />
	};<br />
}</p>
<p>_global.cfServer = NetServices.createGatewayConnection();<br />
var server = cfServer.getService(&#8221;CM_access.ExampleService&#8221;, new Result());</p>
<p>//call a method<br />
server.getTree();</p>
<p>2. code in CFC:<br />
<cfcomponent name="ExampleService" ><br />
	<cffunction name="getTree" access="remote" returnType="query"><br />
		<cfquery name="rsGetParts" datasource="CM33" ><br />
			SELECT table_id, parent_table_id, table_display_name<br />
			FROM tree<br />
		</cfquery><br />
		<cfreturn rsGetParts><br />
	</cfreturn></cffunction><br />
</cfcomponent></p>
<p>3. Changes made in FRSTree.as </p>
<p>p.idField = &#8220;table_id&#8221;;</p>
<p>/**<br />
	@property parentIDField [string] the field (columnName) in the RecordSet indicating the uniqueID of parent<br />
	change this according to your dataBase design<br />
*/</p>
<p>p.parentIDField = &#8220;parent_table_id&#8221;;</p>
<p>/**<br />
	@property labelField [string] the field (columnName) in the RecordSet indicating the label<br />
	change this according to your dataBase design<br />
*/<br />
p.labelField = &#8220;table_display_name&#8221;;</p>
<p>Thanks,<br />
Yadviga</p>
]]></content:encoded>
				</item>
</channel>
</rss>
