csteinhilber
Programmer
Currently running Flex 1.5. Eventually we'll move to 2.0, which may or may not solve this issue... but for now...
I'm trying to create a hierarchy in a ColdFusion CFC to pass into Flex for use as a dataprovider for a (standard) Tree control.
So I produce an array of structs (objects), with or without children. The final node in a branch containing a data object with several attributes. The problem is that when that last node is displayed in the Flex Tree, it has a child element (ie - it's expandable) that contains an undefined object.
I've tried various combinations of using _remoteClass = "Object", but I still get this phantom final node.
As I've worked through this problem, I've gotten my test data down to a pretty bare minimum (hard-coded... just a single node with a child):
and when I set my Flex Tree's dataprovider to this array, I get the following displayed in Flex:
Anyone know what I might be doing wrong? Or what I need to do to get rid of that last node?
Thanks in advance,
-Carl
I'm trying to create a hierarchy in a ColdFusion CFC to pass into Flex for use as a dataprovider for a (standard) Tree control.
So I produce an array of structs (objects), with or without children. The final node in a branch containing a data object with several attributes. The problem is that when that last node is displayed in the Flex Tree, it has a child element (ie - it's expandable) that contains an undefined object.
I've tried various combinations of using _remoteClass = "Object", but I still get this phantom final node.
As I've worked through this problem, I've gotten my test data down to a pretty bare minimum (hard-coded... just a single node with a child):
Code:
<cfscript>
aryFinalTreeHierarchy = ArrayNew(1);
strNodeDescription["_remoteClass"] = "Object";
strNodeDescription["label"] = "Node 1";
strNodeDescription["children"] = ArrayNew(1);
strChildDescription = StructNew();
strChildDescription["_remoteClass"] = "Object";
strChildDescription["label"] = "Child 1";
strChildDescription["data"] = StructNew();
strChildDescription.data["_remoteClass"] = "Object";
strChildDescription.data["doctype"] = "File";
strChildDescription.data["docsku"] = "GSF345";
ArrayAppend(strNodeDescription.children,strChildDescription);
ArrayAppend(aryFinalTreeHierarchy,strNodeDescription);
</cfscript>
and when I set my Flex Tree's dataprovider to this array, I get the following displayed in Flex:
Code:
+ Node 1
--+ Child 1
----+ [object Object], 1, , [object Object], null
Anyone know what I might be doing wrong? Or what I need to do to get rid of that last node?
Thanks in advance,
-Carl