 //			}
 		}
 
-		private function handleColumnEntities(event:ResultEvent, token:Object = null):void
+		private function handleColumnEntities(event:ResultEvent, hierarcyNode_entityIds:Array):void
 		{
 			if (objectWasDisposed(this))
 				return;
 
-			var hierarchyNode:XML = token as XML; // the node to add the list of columns to
+			var hierarchyNode:XML = hierarcyNode_entityIds[0] as XML; // the node to add the list of columns to
+			var entityIds:Array = hierarcyNode_entityIds[1] as Array; // ordered list of ids
+
 			try
 			{
-				var entities:Array = event.result as Array
+				var entities:Array = event.result as Array;
+				entities.sort(
+					function(entity1:Object, entity2:Object):int
+					{
+						var i1:int = entityIds.indexOf(entity1.id);
+						var i2:int = entityIds.indexOf(entity2.id);
+						return ObjectUtil.numericCompare(i1, i2);
+					}
+				);
 				
 				// append list of attributes
 				for (var i:int = 0; i < entities.length; i++)
 				{
 					var metadata:Object = entities[i].publicMetadata;
+					metadata['id'] = entities[i].id;
 					var node:XML = <attribute/>;
 					for (var property:String in metadata)
 						if (metadata[property])

	import mx.utils.ObjectUtil;
	
	import weave.api.WeaveAPI;
	import weave.api.data.ColumnMetadata;
	import weave.api.data.DataTypes;
	import weave.api.data.IAttributeColumn;
	import weave.api.data.IColumnReference;
	import weave.api.data.IDataRowSource;
	import weave.api.data.IQualifiedKey;
	import weave.api.disposeObjects;
	import weave.api.newLinkableChild;
	import weave.api.objectWasDisposed;
	import weave.api.reportError;
	import weave.api.services.IWeaveGeometryTileService;
	import weave.core.LinkableString;
	import weave.data.AttributeColumns.NumberColumn;
	import weave.data.AttributeColumns.ProxyColumn;
	import weave.data.AttributeColumns.SecondaryKeyNumColumn;
	import weave.data.AttributeColumns.StreamedGeometryColumn;
	import weave.data.AttributeColumns.StringColumn;
	import weave.data.ColumnReferences.HierarchyColumnReference;
	import weave.data.QKeyManager;
	import weave.services.WeaveDataServlet;
	import weave.services.addAsyncResponder;
	import weave.services.beans.AttributeColumnData;
	import weave.services.beans.EntityType;
	import weave.utils.ColumnUtils;
	import weave.utils.HierarchyUtils;
	
	/**
	 * WeaveDataSource is an interface for retrieving columns from Weave data servlets.

	}
}

import weave.data.AttributeColumns.ProxyColumn;

/**
