Hi
 
Matt And Manish
 
attached is a snapshot from the debugger , you can see that only the backingObject holds the values ...am i missing something ?
 
thanks
 
Shlomi
 


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

Hi Manish and Matt
 
Its not simple as you describe . even the documentation does have a bug , i've tried the code from below and the output is
[object],[object].....
 
 
let me remind you that my objects are jave objects that come from the server in SOAP and i have no idea what flex does with them , and believe me i tried and read all your documentation .
 
Manish your example is good for Tree that was built on XML and not from objects , cause in my case you would have
get [object Object],1,[object Object]
 
my Java objects are very simple they like this
 
class SystemFile {
   
    String fileName ;
    String fileGuid ;
}
 
class SystemFolder{
   
    String folderName;
    SystemFolder[] childFolders;
    SystemFile[] systemFiles;
}
 
trying to get to item.folderName didn't work also not item.fileName.
 
i didn't find any way to access my original object members besides backing object , what is wrong 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
______________________________________________________________________

______________________________________________________________________
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
______________________________________________________________________

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


Yahoo! Groups Links

<<attachment: flex_debug.jpg>>

Reply via email to