A few of you asked to see the ActionScript code use to implement the query2tree() function used in the Flex example I posted last week. So, here it is:
function query2tree(src) {
// Define tree object
var tree:XML = new XML();
// Define vars
var recNo:Number, itemCount:Number;
var rec:Object;
var categElement:XMLNode, childElement:XMLNode;
// Loop through records
for (recNo=0; recNo
I've been going back and forth on whether or not my CFC should return the complete XML. There would probably be performance gains in doing so, but at the same time I think my CFC code needs to not be tied to any specific client technology (and Flex is a ColdFusion client here). The jury is still out on this one.
Leave a Reply