Name

CatalystX::Usul::View::HTML - Render a page of HTML or XHTML

Version

0.5.$Revision: 1139 $

Synopsis

use base qw(CatalystX::Usul::View::HTML);

Description

Generate a page of HTML or XHTML using Template Toolkit and the contents of the stash

Subroutines/Methods

COMPONENT

Looks up and caches CSS, Javascript and template files rather than test for their existence with each request

bad_request

Adds the provided error message to the result div after prepending a stock phrase specific to the failed action

deserialize

Dummy method, does nothing in this view

get_verb

Returns the _method parameter from the query which is used by the action class to lookup the action to forward to. Called from the begin method once the current view has been determined from the request content type

not_implemented

Proxy for "bad_request"

process

Calls "_fix_stash", _build_widgets, "_setup_css" and "_setup_jscript" before calling Template::Toolkit via the parent class. Will also call "_fillform" if the override attribute was set in the stash to indicate an error. Encodes the response body using the currently selected encoding

_build_widgets in CatalystX::Usul::View is passed those parts of the stash that might contain widget definitions which it renders as HTML or XHTML

Private Methods

_fillform

Uses HTML::FillInForm to fill in the response body from the request parameters

_fix_stash

Adds some extra entries to the stash

template

Detects and loads a custom template if one has been created for this page

target

Sets the target for this page in the headers

_setup_css

For the selected skin sets up the data for the main CSS link and the alternate CSS links if any exist

_setup_jscript

For the selected skin adds it's Javascript file to the list files that will be linked into the page

Diagnostics

None

Configuration and Environment

css

Basename of the file containing the CSS for the generated page. Defaults to presentation

jscript

Basename of the file containing the Javascript used to modify the default behaviour of the browser. Defaults to behaviour

default_template

Basename of the TT file used to generate the page. Defaults to layout

template_extension

Templage file extension. Defaults to tt

Dependencies

Catalyst::View::TT
CatalystX::Usul::View
Encode

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Author

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Copyright (c) 2008 Peter Flanigan. All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic

This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE