diff Lib/IMPL/Web/Application.pm @ 65:2840c4c85db8

Application configuration improvements Documentation
author wizard
date Tue, 16 Mar 2010 17:36:13 +0300
parents 76b878ad6596
children 9f5795a10939
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application.pm	Mon Mar 15 17:45:13 2010 +0300
+++ b/Lib/IMPL/Web/Application.pm	Tue Mar 16 17:36:13 2010 +0300
@@ -16,6 +16,7 @@
     public property handlerError => prop_all;
     public property factoryAction => prop_all;
     public property handlersQuery => prop_all | prop_list;
+    public property responseCharset => prop_all;
     public property options => prop_all;
 }
 
@@ -30,6 +31,7 @@
 	my ($this) = @_;
 	
 	$this->factoryAction('IMPL::Web::Application::Action') unless $this->factoryAction;
+	$this->responseCharset('utf-8') unless $this->responseCharset;
 }
 
 sub Run {
@@ -37,12 +39,12 @@
     
     while (my $query = $this->FetchRequest()) {
         
-        # todo: move a creation of the response to the ActionClass
         my $action = $this->factoryAction->new(
         	query => $query,
-        	response => new IMPL::Web::Application::Response(query => $query),
         	application => $this, 
-        ); 
+        );
+        
+        $action->response->charset($this->responseCharset);
         
         $action->ChainHandler($_) foreach $this->handlersQuery;