Meaning i have to implement the TreeDataProviderAPI ? - i thought it wasn't a must and that flex automatically convert my objects to AS objects.
Even if i will implement this how can i access my original java object members from AS?
 
can you please shade some light here ?
 
thanks
Shlomi
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Chotin
Sent: Wednesday, April 20, 2005 00:54
To: [email protected]
Subject: RE: [flexcoders] How to populate tree control from web service re sult (server side java objects)

Also check out the TreeDataProvider API.  You should always use the methods specified in that API when working with either XML or Objects in a Tree or Menu.  That way you don't have to worry about backingObject which is an implementation detail purposely not documented.

 

Matt

 


From: [email protected] [mailto:[email protected]]
Sent: Tuesday, April 19, 2005 1:10 PM
To: [email protected]
Subject: Re: [flexcoders] How to populate tree control from web service re sult (server side java objects)

 

On 4/19/05, Shlomi Cohen <[EMAIL PROTECTED]> wrote:

> if i have a function that get a node like this
>  
>    function myLabelFunc(item):String {
>       
>         var type=typeof item; // always return {Object}
>         return item._???????
>        }

> how do i know which properties the variable 'item' has ?

If you're writing a labelFunction for a tree, you're expected to know
the format of the item so you can construct the label string out of
the data within the item.  For example, I have an item with properties
'name' and 'phone' (number), and I want the label to be a combination
of both:

  <mx:Tree labelFunction="makeLabel" />

   function makeLabel(item):String
   {
      return item.name + ": " + item.phone;
   }

makeLabel() is called for every node in the tree.

--
[EMAIL PROTECTED]
http://manish.revise.org/


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________


Yahoo! Groups Links

Reply via email to