GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  REACTION::UI::CONTROLLER::ROOT (3)

.ds Aq ’

NAME

Reaction::UI::Controller::Root - Base component for the Root Controller

CONTENTS

SYNOPSIS



  package MyApp::Controller::Root;
  use base Reaction::UI::Controller::Root;

  __PACKAGE__->config(
    view_name => Site,
    window_title => Reaction Test App,
    namespace => 
  );

  # Create UI elements:
  $c->self->push_viewport(Reaction::UI::ViewPort, %args);

  # Access the window title in a template:
  [% window.title %]



DESCRIPTION

Using this module as a base component for your Catalyst Root Controller provides automatic creation of a Reaction::UI::Window object containing an empty Reaction::UI::FocusStack for your UI elements. The stack is also resolved and rendered for you in the end action.

At the begin of each request, the Window object is created using the configured view_name, content_type and window_title. These thus should be directly changed on the stashed window object at runtime, if needed.

ATTRIBUTES

    view_name

Arguments: $viewname?
Set or retrieve the classname of the view used to render the UI. Can also be set by a call to config. Defaults to ’XHTML’.

    content_type

Arguments: $contenttype?
Set or retrieve the content type of the page created. Can also be set by a call to config or in a config file. Defaults to ’text/html’.

    window_title

Arguments: $windowtitle?
Set or retrieve the title of the page created. Can also be set by a call to config or in a config file. No default.

ACTIONS

    begin

Stuffs a new Reaction::UI::Window object into the stash, using the view_name and content_type provided in the configuration.

Make sure you call this base begin action if writing your own.

    end

Draws the UI via the flush in Reaction::UI::Window method.

METHODS

    error_404

Sets $c->res (the Catalyst::Response) body, status and content type to output a 404 (File not found) error.

    error_403

Sets $c->res (the Catalyst::Response) body, status and content type to output a 403 (Forbidden) error.

AUTHORS

See Reaction::Class for authors.

LICENSE

See Reaction::Class for the license.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 REACTION::UI::CONTROLLER::ROOT (3) 2010-10-29

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.