|
A TreeDataProvider cannot be an array. It
has to be a single object that has a child array. So try creating an object
like this: Var treeDetails:Object = {label: ‘root’}; treeDetails.children = treeList; get the array of details back: var arr:Array =
treeCmp.dataProvider.getProperty(“children”); Matt From: Hi all, I am assigning an array as TreedataProvider. When i'm moving the position of nodes of the tree (using addTreeNodeAt
/ removeTreeNodeAt),
the dataProvider
is not updated to the changed nodes, so i'm
explicitly typecasting and assignig back to array. This seems to behave abnormally (undefined node added to
the tree at the top)... Here are some pieces of code i use.... var treeDetails : Array; // This is assigned as the
dataProvider for the tree : : treeDetails = treeList; // treeList is a array got from
Java which has HashMaps
at each row : : // After moving nodes treeDetails is treeDetails =
mx.utils.ArrayUtils.toArray(treeCmp.dataProvider) ; //treeCmp is tree's ID Then i'm passing back treeDetails to Java, i'm getting
"Error: An error occurred during service invocation".
While assigning dataProvider to treeDetails i can notice that a
undefined node added to the top. Also i noticed that when using a simply array in flex
every thing is working fine, and when the array contains object dataProvider is
not updated and also i'm getting error in java when typecasting and send
it as array. Can anyone give me an idea what could have caused the
problem. Please give me a solution. Thanks in advance. Regards, Arun. Yahoo!
FareChase - Search multiple travel sites in one click. |
- RE: [flexcoders] Problem with type casting a TreedataProvi... Matt Chotin
- [flexcoders] This *really* Sucks! Robert Thompson
- RE: [flexcoders] Problem with type casting a Treedata... Arunkumar S

