package components { import data.DataSource; import mx.collections.ICollectionView; import mx.collections.XMLListCollection; import mx.controls.treeClasses.DefaultDataDescriptor; public class AuthorDataDescriptor extends DefaultDataDescriptor { private var _dataSource:DataSource; public function AuthorDataDescriptor(dataSource:DataSource) { _dataSource = dataSource; } public override function isBranch(node:Object, model:Object = null):Boolean { var type:String = XML(node).localName().toString(); if(type == "Contexts" || type == "Context" || type == "Layers" || type == "Servers" || type == "QueryAspects" || type == "Maps" || type == "Map" || type == "Layers" || type == "Templates" || type == "Reports" || type == "Configs" || type == "Geoide_Client_Config" || type == "ButtonBars" || type == "ActionButtons" || type == "MapViewerButtons" || type == "PaneButtons" || type == "SinglePaneComponents" || type == "MultiPaneComponents" ) { //return true; return node.@status != "deleted"; } if(type == "Layer") { if(_dataSource.getProps(XML(node)).Type == "Group") { return node.@status != "deleted"; } } return false; } } }