Hi Henry,

I also faced the same issue in my project. I got one solution to this.

In method clickedItem(), you are traversing through the XML. Instead you can
take the selectedXML and traverse it through tree dataprovider i.e. XMLList
and then use that to expand the child of that node of tree.

This problem is because of different UID of tree.

Hope this solve your issue.

Regards
Gagan Deep

On 4 October 2011 14:32, henry joe <[email protected]> wrote:

>
> i have written this code below to open a certain node "selectedXml" yet it
> doesn't open it and it doesn't show the parents. instead, it just shows the
> given node. Anyone knows what i should do?
>
>
>
> private function clickedItem():void{
>
>          selectedXml = treeDP.selectedItem;
>             for each (var child:XML in parentXmlCopy.children()){
>                 if 
> (child..model_chain.contains(selectedXml)||child.contains(selectedXml)||child.model_chain..task.contains(selectedXml)){
>
>                     tree.expandChildrenOf(child,false);
>                     len = selectedXml.childIndex();
>                     trace(len);
>                     expandConcernedNode(selectedXml);
>
>                 }
>
>             }
>         }
>
>
>         private function expandConcernedNode(_xml:XML):void{
>
>             while (_xml.parent() != null) {
>                 _xml = _xml.parent();
>                 tree.expandItem(_xml, true, false);
>
>                 tree.selectedItem = selectedXml;
>             }
>         }
>
> I have searched alot on the internet, still no solution to the problem. I
> am actually calling the clickedItem() function from a list Handler this way
> :
>
> protected function treeDP_changeHandler(event:IndexChangeEvent):void
>
>         {
>             
> if(condRBT.selected||modelRBT.selected||taskRBT.selected||chainRBT.selected)
>                 callLater(clickedItem);
>
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>



-- 
*Thanks*
*Gagan Deep*

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to