Thank you for the response, but that produced the same results.

Other thoughts?

I assume that since my TreeNodeVO has a label attribute, that is all
that is really required?  Is it having trouble understanding this VO?

Thanks again

Pat


--- In [email protected], "Andrew Spaulding" <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Maybe try something like this:
> 
> <mx:Tree nodeOpen="getNodes(event.node)" />
> 
> you might want to store a reference to this node rather than using
> contentMgmtTree.selectedItem.
> 
> So you script block might look like this:
> 
> public function getNodes( treeNode )
> {
>   treeSelectedNode = treeNode;
>   EventBroadcaster.getInstance().broadcastEvent( "getTheNodez",
> treeNode.getData().oid );
> }
> 
> 
> //and for adding the nodes
> 
> public function addTreeNodeUnderSelected(treeNode:TreeNodeVO)
> {
>   var tempNode:TreeNode = treeSelectedNode.addTreeNode( treeNode );
>   //or break it down even further with this
>   //var tempNode:TreeNode = treeSelectedNode.addTreeNode(
> treeNode.label, treeNode );
> 
>   if( treeNode.hasChildren == true )
>   {
>     tempNode.setProperty( 'isBranch', true, true );
>   }
>   else
>   {
>     tempNode.setProperty( 'isBranch', false, true );
>   }
> }
> 
> 
> The only real difference is that I store a reference to the selected
> node from the nodeOpen event using event.node. This is then what I
> would use to add the child nodes to.
> 
> See how that goes. 
> 
> Andrew Spaulding
> www.flexdaddy.info
> 
> 
> 
> 
> --- In [email protected], "pat_ryan_99" <[EMAIL PROTECTED]>
wrote:
> > Hi Everyone,
> > 
> > I have looked through old messages in this group and did not see
> > anything that addresses my question - or at least it was not clear
> > that it did.
> > 
> > Here is what I am trying to do.
> > 
> > Using the Cairngorm framework, I am making a remote call to my server
> > to retrieve something I wrote called a TreeNodeVO ( which has a public
> > label property ).
> > 
> > My ViewHelper adds the Root node like this (which works ):
> > 
> > public function addRootTreeNode(treeNode:TreeNodeVO) : Void {
> >   view.contentMgmtTree.removeAll();
> >   var node:Object = view.contentMgmtTree.addTreeNode(treeNode);
> >   if( treeNode.hasChildren == true ) {
> >      view.contentMgmtTree.setIsBranch(node,true);
> >   }
> > }
> > 
> > when I open the tree node, I make another remote call to get the
> > children as an Array of TreeNodeVO objects.
> > 
> > The ViewHelper method to add the other nodes under the opened node
> > looks like:
> > 
> > public function addTreeNodeUnderSelected(treeNode:TreeNodeVO) : Void {
> >   trace("treeNode: " + treeNode.toString());
> >   var node:Object =
> > view.contentMgmtTree.selectedItem.addTreeNode(treeNode);
> >   if( treeNode.hasChildren == true ) {
> >      view.contentMgmtTree.setIsBranch(node,true);
> >   }
> > }
> > 
> > what I see happening is the root node renders correctly as a folder
> > with the right label.  When I open the folder the server is returning
> > the correct array of TreeNodeVO objects but what is rendered under the
> > root node is a document icon ( which is correct ) but with the label
> > "[type Function],[type Function],..."
> > 
> > Can someone please point me in the right direction on the correct way
> > to add nodes that DO NOT use the XML model?
> > 
> > Any help is greatly appreciated.
> > 
> > 
> > Thanks





------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hh0lo59/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124129694/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to