Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Passing tree hierarchy to Flex from ColdFusion CFC

Passing tree hierarchy to Flex from ColdFusion CFC

Passing tree hierarchy to Flex from ColdFusion CFC

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):


    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";

and when I set my Flex Tree's dataprovider to this array, I get the following displayed in Flex:


 + 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,

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close