CatalystX::Usul::View - Base class for views


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.

Index


Name

Top

CatalystX::Usul::View - Base class for views

Version

Top

0.3.$Revision: 576 $

Synopsis

Top

   package CatalystX::Usul::View;
   use parent qw(Catalyst::View CatalystX::Usul::Base);

   package CatalystX::Usul::View::HTML;
   use parent qw(CatalystX::Usul::View);

   package YourApp::View::HTML;
   use parent qw(CatalystX::Usul::View::HTML);

   package YourApp::View::JSON;
   use parent qw(CatalystX::Usul::View::JSON);

Description

Top

Provide common methods for subclasses

Subroutines/Methods

Top

bad_request

Sets the response body to the provided error message and the response status to 400

build_widgets

Calls build in HTML::FormWidgets which transforms the widgets definitions into fragments of HTML or XHTML as required

deserialize

Calls the deserialization method selected by the subclass on the request body

get_verb

Returns the lower case request method name. Allows for the implementation of a "RESTful" API. The client may post and set the _method request parameter to delete or put if it does not support those methods directly. It may also set the the _method to an arbitrary value

The verb 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

Sets the response body to the provided error message and the response status to 405

prepare_data

Called by process this method is responsible for selecting those elements from the stash that are passed to the /build_widgets method

process

Serializes the response using XML::Simple and encodes the body using Encode if required

Diagnostics

Top

None

Configuration and Environment

Top

None

Dependencies

Top

Catalyst::View
CatalystX::Usul::Base
Encode
HTML::FormWidgets

Incompatibilities

Top

There are no known incompatibilities in this module

Bugs and Limitations

Top

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

Author

Top

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

License and Copyright

Top


CatalystX-Usul documentation  | view source Contained in the CatalystX-Usul distribution.