diff Lib/IMPL/DOM/Transform/QueryToDOM.pm @ 323:b56b1ec33b59

minor changes to support JSON in transformation from a query to an object
author sergey
date Thu, 23 May 2013 18:40:26 +0400
parents c9c2ec29793f
children 34a110d1f06c
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Transform/QueryToDOM.pm	Tue May 21 10:04:11 2013 +0400
+++ b/Lib/IMPL/DOM/Transform/QueryToDOM.pm	Thu May 23 18:40:26 2013 +0400
@@ -16,6 +16,7 @@
 	my ($this) = @_;
 	
 	$this->templates->{'CGI'} = 'TransformCGI';
+	$this->templates->{'IMPL::Web::Application::Action'} = 'TransformAction';
 
 	$this->delimiter('[.]');
 	$this->prefix('');
@@ -41,7 +42,7 @@
 
 sub TransformCGI {
 	my ($this,$query) = @_;
-
+	
     my $data={};
     
     my $prefix = $this->prefix;
@@ -76,6 +77,12 @@
     return $this->Transform($data);
 }
 
+sub TransformAction {
+	my ($this,$action) = @_;
+	
+	return $this->Transform($action->isJson ? $action->jsonData : $action->query);
+}
+
 1;
 
 __END__