diff Lib/IMPL/Web/View/Metadata/FormProvider.pm @ 367:608e74bc309f

form metadata, mostly done
author cin
date Tue, 03 Dec 2013 17:55:36 +0400
parents 935629bf80df
children
line wrap: on
line diff
--- a/Lib/IMPL/Web/View/Metadata/FormProvider.pm	Mon Dec 02 17:44:38 2013 +0400
+++ b/Lib/IMPL/Web/View/Metadata/FormProvider.pm	Tue Dec 03 17:55:36 2013 +0400
@@ -30,6 +30,7 @@
 	foreach my $decl (@{$meta->schema->content->childNodes}) {
 		
 		my $schema = $navi->NavigateName($decl->name);
+		$navi->SchemaBack();
 		
 		my @nodes = $meta->model && $meta->model->selectNodes( sub { $_->schemaSource == $decl } );
 		
@@ -52,34 +53,21 @@
 			$type = $decl->type;
 		}
 
-		push @props, Meta->new(
-			$this,
-			\@nodes,
-			$decl->type,
-			{
-				name => $decl->name,
-				schema => $schema,
-			}
-		)
+		push @props, Meta->new($this,$model,$type,\%args);
 	}
 }
 
+sub GetItems {
+	my ($this,$meta) = @_;
+	
+	if ($meta->isMultiple)
+}
+
+sub GetItem {
+	my ($this,$meta,$index) = @_;
+}
+
 
-sub _IsErrorRelates {
-    my ($nodes,$source,$err) = @_;
-    
-    # this is an own error
-    return 1 if ($err->node && grep($err->node == $_, @$nodes)) || (not(@$nodes) && $err->schema == $source );
-    
-    # this error relates to the child control 
-    
-    return 0 unless @$nodes;
-    
-    for (my $n = $err->parent; $n ; $n = $n->parentNode) {
-        return 1 if grep($n == $_, @$nodes);
-    }
-    
-    return 0;
-} 
+
 
 1;
\ No newline at end of file