I'm using an XMLListCollection as a dataprovider for a MenuBar.  I'm
trying to find a way to easily filter out menu items based on a
visible property of the data provider.

On the top level of the MenuBar, this is easy.  I set a filterFunction
and only return visible nodes.  

However, I also need to filter out nested levels of the menu.  If my
data provider looks like this:

<menu>
    <mainMenu label="File" visible="true">
        <menuitem label="Save" visible="true" />
        <menuitem label="Save All" visible="false" />
    </mainMenu>
    <mainMenu label="Edit" visible="false">
    ....
    </mainMenu>
</menu>

I need to filter out the Save All item, while showing File -> Save. 
Does anyone know a way to do this?  I looked into using the
DataDescriptor, but it only has an enabled or toggled property.  Also
looked into extending the menu itemrenderer but I thought I would post
before going too far down that road.

Reply via email to