NAME

Reaction::UI::Controller

DESCRIPTION

Controller class used to make displaying collections easier. Inherits from Reaction::UI::Controller.

ATTRIBUTES

model_name

The name of the model this controller will use as it's data source. Should be a name that can be passed to $C->model

collection_name

The name of the collection whithin the model that this Controller will be utilizing.

action_viewport_map

_build_action_viewport_map - Provided builder method, see METHODS
has_action_viewport_map - Auto generated predicate
clear_action_viewport_map- Auto generated clearer method

Read-write lazy building hashref. The keys should match action names in the Controller and the value should be the ViewPort class that this action should use. See method basic_page for more info.

Read-write lazy building hashref. Additional ViewPort arguments for the action named as the key in the controller. See method basic_page for more info.

_build_action_viewport_args - Provided builder method, see METHODS
has_action_viewport_args - Auto generated predicate
clear_action_viewport_args- Auto generated clearer method

METHODS

get_collection $c

Returns an instance of the collection this controller uses.

_build_action_viewport_map

Provided builder for action_viewport_map. Returns a hash with two items:

list => 'Reaction::UI::ViewPort::ListView',
view => 'Reaction::UI::ViewPort::Object',

_build_action_viewport_args

Returns an empty hashref.

basic_page $c, \%vp_args

Accepts two arguments, context, and a hashref of viewport arguments. It will automatically determine the action name using the catalyst stack and call push_viewport with the ViewPort class name contained in the action_viewport_map with a set of options determined by merging $vp_args and the arguments contained in action_viewport_args, if any.

ACTIONS

base

Chain link, no-op.

list

Chain link, chained to base. list fetches the collection for the model and calls basic_page with a single argument, collection.

The default ViewPort for this action is Reaction::UI::ViewPort::ListView and can be changed by altering the action_viewport_map attribute hash.

object

Chain link, chained to base, captures one argument, 'id'. Attempts to find a single object by searching for a member of the current collection which has a Primary Key or Unique constraint matching that argument. If the object is found it is stored in the stash under the object key.

view

Chain link, chained to object. Calls basic page with one argument, model, which contains an instance of the object fetched by the object action link.

The default ViewPort for this action is Reaction::UI::ViewPort::Object and can be changed by altering the action_viewport_map attribute hash.

Reaction::UI::Controller

AUTHORS

See Reaction::Class for authors.

LICENSE

See Reaction::Class for the license.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 117:

Unknown directive: =head

Around line 187:

Unknown directive: =SEE