Mercurial > pub > Impl
diff Lib/IMPL/Web/Application/ControllerUnit.pm @ 126:c8dfbbdd8005
Several bug fixes
Forms support pre-alfa version
author | wizard |
---|---|
date | Fri, 11 Jun 2010 04:29:51 +0400 |
parents | 7b14e0122b79 |
children | 0dce0470a3d8 |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application/ControllerUnit.pm Thu Jun 10 17:43:51 2010 +0400 +++ b/Lib/IMPL/Web/Application/ControllerUnit.pm Fri Jun 11 04:29:51 2010 +0400 @@ -106,7 +106,8 @@ ); $result{formSchema} = $schema; - $result{formData} = $transform->Transform($self->query); + $result{formData} = $transform->Transform($action->query); + if ($process) { $result{formErrors} = $transform->Errors->as_list; @@ -127,9 +128,13 @@ sub loadSchema { my ($self,$name) = @_; - my ($vol,$dir,$file) = File::Spec->splitpath( Class::Inspector->resolved_filename(ref $self || $self) ); - - return IMPL::DOM::Schema->LoadSchema(File::Spec->catfile($vol,$dir,$name)); + if (-f $name) { + return IMPL::DOM::Schema->LoadSchema($name); + } else { + my ($vol,$dir,$file) = File::Spec->splitpath( Class::Inspector->resolved_filename(ref $self || $self) ); + + return IMPL::DOM::Schema->LoadSchema(File::Spec->catfile($vol,$dir,$name)); + } } 1;