Mercurial > pub > Impl
diff 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 |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Handler/TTView.pm Thu May 03 01:00:02 2012 +0400 +++ b/Lib/IMPL/Web/Handler/TTView.pm Thu May 03 16:48:39 2012 +0400 @@ -56,6 +56,8 @@ $this->SelectView($action,ref $result), $vars ); + + $action->response->contentType($this->contentType); my $hout = $action->response->streamBody; @@ -232,11 +234,29 @@ =begin code xml -<view type="HASH"> - <item extname="@My::Data::Product">product/info</item> - <catalog> - <catalog> -</view> +<item id="html-view" type="IMPL::Web::Handler::TTView"> + <contentType>text/html</contentType> + <loader id="tt-loader" type="IMPL::Web::View::TTLoader"> + <options type="HASH"> + <INCLUDE_PATH type="IMPL::Config::Reference"> + <target>IMPL::Config</target> + <AppBase>view</AppBase> + </INCLUDE_PATH> + <INTERPOLATE>1</INTERPOLATE> + <POST_CHOMP>1</POST_CHOMP> + <ENCODING>utf-8</ENCODING> + </options> + <ext>.tt</ext> + <initializer>global.tt</initializer> + <layoutBase>layouts</layoutBase> + </loader> + <defaultDocument>default</defaultDocument> + <selectors type="ARRAY"> + <item>@HASH => dump</item> + <item>@My::Data::Product => product/info</item> + <item>{action:.*} @My::Data::Product => product/{action}</item> + </selectors> +</item> =end code xml @@ -252,10 +272,10 @@ [url-template] [class] => template -shoes * => product/list +shoes => product/list {action:*.} @My::Data::Product => product/{action} -stuff list => product/list +stuff >list => product/list details => product/details =end text