| 364 | 1 package IMPL::Web::View::Metadata::FormProvider; | 
|  | 2 use strict; | 
|  | 3 | 
|  | 4 use IMPL::declare { | 
| 365 | 5 	require => { | 
|  | 6 		Meta => 'IMPL::Web::View::Metadata::FormMeta' | 
|  | 7 	}, | 
| 364 | 8 	base => [ | 
|  | 9 		'IMPL::Object' => undef | 
|  | 10 	] | 
|  | 11 }; | 
|  | 12 | 
|  | 13 sub GetFormMetadata { | 
|  | 14 	my ($this,$model, $form) = @_; | 
|  | 15 } | 
|  | 16 | 
|  | 17 sub PopulateChildren { | 
|  | 18 	my ($this,$meta) = @_; | 
|  | 19 | 
| 365 | 20 	map Meta->new($this,), $meta->schema->content->childNodes; | 
| 364 | 21 } | 
|  | 22 | 
|  | 23 sub GetChild { | 
|  | 24 | 
| 365 | 25 } | 
|  | 26 | 
|  | 27 sub _IsErrorRelates { | 
|  | 28     my ($node,$source,$err) = @_; | 
|  | 29 | 
|  | 30     # this is an own error | 
|  | 31     return 1 if ($node && $err->node && $err->node == $node) || (not($node) && $err->schema == $source ); | 
|  | 32 | 
|  | 33     # this error relates to the child control | 
|  | 34 | 
|  | 35     return 0 unless $node; | 
|  | 36 | 
|  | 37     for (my $n = $err->parent; $n ; $n = $n->parentNode) { | 
|  | 38         return 1 if $n == $node; | 
|  | 39     } | 
|  | 40 | 
|  | 41     return 0; | 
| 364 | 42 } | 
|  | 43 | 
|  | 44 1; |