comparison Lib/IMPL/Web/View/TTDocument.pm @ 245:7c517134c42f

Added Unsupported media type Web exception corrected resourceLocation setting in the resource Implemented localizable resources for text messages fixed TT view scopings, INIT block in controls now sets globals correctly.
author sergey
date Mon, 29 Oct 2012 03:15:22 +0400
parents f48a1a9f4fa2
children 0f59b2de72af
comparison
equal deleted inserted replaced
244:a02b110da931 245:7c517134c42f
86 86
87 my $path = $control; 87 my $path = $control;
88 if ( my $template = $this->loader->template($path) ) { 88 if ( my $template = $this->loader->template($path) ) {
89 my $opts = { %{$this->opts} }; 89 my $opts = { %{$this->opts} };
90 90
91 # avoid propagation of local variables 91 # factory will create a clone of the stash
92 $opts->{STASH} = $this->stash->clone(); 92 # $opts->{STASH} = $this->stash->clone();
93 93
94 my $ctx = new Template::Context($opts); 94 my $ctx = new Template::Context($opts);
95 95
96 $factory = new IMPL::Web::View::TTFactory( 96 $factory = new IMPL::Web::View::TTFactory(
97 $template->class || typeof IMPL::Web::View::TTControl, 97 $template->class || typeof IMPL::Web::View::TTControl,
126 if ($this->layout) { 126 if ($this->layout) {
127 return $this->context->include( 127 return $this->context->include(
128 $this->loader->layout($this->layout), 128 $this->loader->layout($this->layout),
129 { 129 {
130 %{$newArgs}, 130 %{$newArgs},
131 content => sub { $this->RenderContent($newArgs); }, 131 content => $this->RenderContent($newArgs),
132 this => $this, 132 this => $this,
133 template => $this->template 133 template => $this->template
134 } 134 }
135 ); 135 );
136 } else { 136 } else {