annotate Lib/IMPL/Web/QueryHandler/PageFormat.pm @ 63:76b878ad6596

Added serialization support for the IMPL::Object::List More intelligent Exception message Fixed encoding support in the actions Improoved tests Minor fixes
author wizard
date Mon, 15 Mar 2010 02:38:09 +0300
parents c64bd1bf727d
children 259cd3df6e53
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
62
c64bd1bf727d Web application
wizard
parents:
diff changeset
1 package IMPL::Web::QueryHandler::PageFormat;
c64bd1bf727d Web application
wizard
parents:
diff changeset
2 use base qw(IMPL::Web::QueryHandler);
c64bd1bf727d Web application
wizard
parents:
diff changeset
3
c64bd1bf727d Web application
wizard
parents:
diff changeset
4 __PACKAGE__->PassThroughArgs;
c64bd1bf727d Web application
wizard
parents:
diff changeset
5
c64bd1bf727d Web application
wizard
parents:
diff changeset
6 use IMPL::Class::Property;
63
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
7 use IMPL::Web::TDocument;
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
8 use Error qw(:try);
62
c64bd1bf727d Web application
wizard
parents:
diff changeset
9
c64bd1bf727d Web application
wizard
parents:
diff changeset
10 sub Process {
c64bd1bf727d Web application
wizard
parents:
diff changeset
11 my ($this,$action,$nextHandler) = @_;
c64bd1bf727d Web application
wizard
parents:
diff changeset
12
63
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
13 my $doc = new IMPL::Web::TDocument();
62
c64bd1bf727d Web application
wizard
parents:
diff changeset
14
63
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
15 try {
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
16 $doc->loadFile ( $ENV{PATH_TRANSLATED}, 'cp1251' );
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
17
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
18 $action->response->contentType('text/html');
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
19 my $hOut = $action->response->streamBody;
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
20
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
21 print $hOut $doc->Render();
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
22 } finally {
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
23 $doc->Dispose;
76b878ad6596 Added serialization support for the IMPL::Object::List
wizard
parents: 62
diff changeset
24 };
62
c64bd1bf727d Web application
wizard
parents:
diff changeset
25 }
c64bd1bf727d Web application
wizard
parents:
diff changeset
26
c64bd1bf727d Web application
wizard
parents:
diff changeset
27 1;