comparison Lib/IMPL/Web/Handler/TTView.pm @ 206:c8fe3f84feba

+IMPL::Web::Handlers::ViewSelector +IMPL::Web::Handlers::ErrorHandler *IMPL::Web::Handlers::RestController moved types mappings to ViewSelector
author sergey
date Thu, 03 May 2012 16:48:39 +0400
parents 891c04080658
children 47f77e6409f7
comparison
equal deleted inserted replaced
205:891c04080658 206:c8fe3f84feba
54 54
55 my $doc = $this->loader->document( 55 my $doc = $this->loader->document(
56 $this->SelectView($action,ref $result), 56 $this->SelectView($action,ref $result),
57 $vars 57 $vars
58 ); 58 );
59
60 $action->response->contentType($this->contentType);
59 61
60 my $hout = $action->response->streamBody; 62 my $hout = $action->response->streamBody;
61 63
62 print $hout $doc->Render($vars); 64 print $hout $doc->Render($vars);
63 } 65 }
230 232
231 =head1 SYNOPSIS 233 =head1 SYNOPSIS
232 234
233 =begin code xml 235 =begin code xml
234 236
235 <view type="HASH"> 237 <item id="html-view" type="IMPL::Web::Handler::TTView">
236 <item extname="@My::Data::Product">product/info</item> 238 <contentType>text/html</contentType>
237 <catalog> 239 <loader id="tt-loader" type="IMPL::Web::View::TTLoader">
238 <catalog> 240 <options type="HASH">
239 </view> 241 <INCLUDE_PATH type="IMPL::Config::Reference">
242 <target>IMPL::Config</target>
243 <AppBase>view</AppBase>
244 </INCLUDE_PATH>
245 <INTERPOLATE>1</INTERPOLATE>
246 <POST_CHOMP>1</POST_CHOMP>
247 <ENCODING>utf-8</ENCODING>
248 </options>
249 <ext>.tt</ext>
250 <initializer>global.tt</initializer>
251 <layoutBase>layouts</layoutBase>
252 </loader>
253 <defaultDocument>default</defaultDocument>
254 <selectors type="ARRAY">
255 <item>@HASH => dump</item>
256 <item>@My::Data::Product => product/info</item>
257 <item>{action:.*} @My::Data::Product => product/{action}</item>
258 </selectors>
259 </item>
240 260
241 =end code xml 261 =end code xml
242 262
243 =head1 DESCRIPTION 263 =head1 DESCRIPTION
244 264
250 270
251 =begin text 271 =begin text
252 272
253 [url-template] [class] => template 273 [url-template] [class] => template
254 274
255 shoes * => product/list 275 shoes => product/list
256 {action:*.} @My::Data::Product => product/{action} 276 {action:*.} @My::Data::Product => product/{action}
257 277
258 stuff list => product/list 278 stuff >list => product/list
259 details => product/details 279 details => product/details
260 280
261 =end text 281 =end text
262 282
263 283