[flexcoders] How to make Tree only display branch nodes without filters

2008-07-21 Thread Greg Hess
Hi All,

My application has a global data model representing a file system. I
have a tree control allowing users to navigate the file system
directories. I am using a global data model so that rename, delete,
add operations automatically propogate to other UIComponents bound to
file children collections.

So I need my trees data provider to be bound to a collection with
branch and leaf nodes but only display ItemRenderers for branch nodes.
I needed a custom TreeIR and I thought I could just set its visible
and includeInLayout properties but it is not working. I think I can do
this in the TreeIR by overriding createChildren(), updateDisplayList
and measure to do nothing with a leaf node but it feels like I should
be using a custom Tree impl to actualy just ignore those leaf nodes.

I also tried to use itemToItemRenderer and return null for leafs but
they are still drawn...

Any help is much appreciated.

Thanks,

Greg


RE: [flexcoders] How to make Tree only display branch nodes without filters

2008-07-21 Thread Alex Harui
In theory, you can override createItemRenderer and return different
kinds of renderers based on the data

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Greg Hess
Sent: Monday, July 21, 2008 12:06 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to make Tree only display branch nodes without
filters

 

Hi All,

My application has a global data model representing a file system. I
have a tree control allowing users to navigate the file system
directories. I am using a global data model so that rename, delete,
add operations automatically propogate to other UIComponents bound to
file children collections.

So I need my trees data provider to be bound to a collection with
branch and leaf nodes but only display ItemRenderers for branch nodes.
I needed a custom TreeIR and I thought I could just set its visible
and includeInLayout properties but it is not working. I think I can do
this in the TreeIR by overriding createChildren(), updateDisplayList
and measure to do nothing with a leaf node but it feels like I should
be using a custom Tree impl to actualy just ignore those leaf nodes.

I also tried to use itemToItemRenderer and return null for leafs but
they are still drawn...

Any help is much appreciated.

Thanks,

Greg