diff Lib/IMPL/Web/Application.pm @ 62:c64bd1bf727d

Web application Page query handler
author wizard
date Fri, 12 Mar 2010 16:23:46 +0300
parents b0c068da93ac
children 76b878ad6596
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application.pm	Wed Mar 10 16:41:46 2010 +0300
+++ b/Lib/IMPL/Web/Application.pm	Fri Mar 12 16:23:46 2010 +0300
@@ -26,14 +26,20 @@
     return $self->LoadXMLFile($file);
 }
 
+sub CTOR {
+	my ($this) = @_;
+	
+	$this->factoryAction('IMPL::Web::Application::Action') unless $this->factoryAction;
+}
+
 sub Run {
     my ($this) = @_;
     
     while (my $query = $this->FetchRequest()) {
-        my $response = new IMPL::Web::Application::Response(request => $query);
+        my $response = new IMPL::Web::Application::Response(query => $query);
         
-        my $action = new IMPL::Web::Application::Action(
-        	request => $query,
+        my $action = $this->factoryAction->new(
+        	query => $query,
         	response => $response,
         	application => $this, 
         );