changeset 385:0d63f5273307

sync
author sergey
date Tue, 11 Feb 2014 01:05:55 +0400
parents 2f16f13b000c
children 4bdf155e5bfe
files Lib/IMPL/Code/BasePropertyImplementor.pm Lib/IMPL/Web/View/Metadata/FormMeta.pm
diffstat 2 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/IMPL/Code/BasePropertyImplementor.pm	Thu Jan 23 17:26:34 2014 +0400
+++ b/Lib/IMPL/Code/BasePropertyImplementor.pm	Tue Feb 11 01:05:55 2014 +0400
@@ -40,15 +40,19 @@
 sub NormalizeSpecification {
 	my ($this,$spec) = @_;
 	
-	return ref $spec
-        ? $spec
-        : {
+	return $spec if ref($spec);
+	
+	if (looks_like_number($spec)) {
+		return {
             get => $spec & PROP_GET,
             set => $spec & PROP_SET,
             isList => $spec & PROP_LIST,
             ownerSet => (($spec & PROP_OWNERSET) == PROP_OWNERSET),
             direct => $spec & PROP_DIRECT
-        };	    
+        };
+	} else {
+		return {};
+	}	    
 }
 
 sub CreateFactoryId {
--- a/Lib/IMPL/Web/View/Metadata/FormMeta.pm	Thu Jan 23 17:26:34 2014 +0400
+++ b/Lib/IMPL/Web/View/Metadata/FormMeta.pm	Tue Feb 11 01:05:55 2014 +0400
@@ -214,8 +214,8 @@
 		die ArgException->new(model => "A node is required")
 			unless is($model,DOMNode);
 		
-		$args->{decl} ||= $model->schemaSource;
-		$args->{schema} ||= $model->schema; 
+		$args->{decl} ||= $model->schemaNode;
+		$args->{schema} ||= $model->schemaType; 
 	}
 	
 	return $self->new(