 		 * Traverse all the record's nodes and execute the argument function passing
 		 * the visited node to it
 		 * */
-		public function traverse(fun:Function):void {
-			if(rootEntity != null) {
-				fun(rootEntity);
-				rootEntity.traverse(fun);
+		public function traverse(funct:Function):void {
+			var stack:Array = new Array();
+			if ( rootEntity != null ) {
+				rootEntity.traverse(funct);
 			}
 		}
 		

			stack.push(rootEntity);
			while ( stack.length > 0 ) {
				var entity:EntityProxy = stack.pop();
				var childNodeNames:IList = entity.childrenDefinitionNames;
				for each (var name:String in childNodeNames) {
					entity.showChildrenErrorsMap.put(name, true);
					var children:IList = entity.getChildren(name);
					for each (var child:NodeProxy in children) {
						if(child is EntityProxy) {
							stack.push(EntityProxy(child));
						}
					}
				}
			}
		}
		

	import org.openforis.collect.remoting.service.UpdateRequestOperation;
	import org.openforis.collect.remoting.service.UpdateRequestOperation$Method;
	import org.openforis.collect.remoting.service.UpdateResponse;
	import org.openforis.collect.util.ArrayUtil;

    [Bindable]
    [RemoteClass(alias="org.openforis.collect.model.proxy.RecordProxy")]
