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
Reaction::UI::Controller::Role::Action::Object(3) User Contributed Perl Documentation Reaction::UI::Controller::Role::Action::Object(3)

Reaction::UI::Controller::Role::Action::Object

Provides an "object" action, which attempts to find an item in a collection and store it in the stash.

    package MyApp::Controller::Foo;

    use base 'Reaction::Controller';
    use Reaction::Class;

    with(
      'Reaction::UI::Controller::Role::GetCollection',
      'Reaction::UI::Controller::Role::Action::Simple',
      'Reaction::UI::Controller::Role::Action::Object',
    );

    __PACKAGE__->config( action => {
      object => { Chained => 'base', PathPart => 'id' },
      foo_action => { Chained => 'object' },
    } );

    sub base :Chained('/base') :CaptureArgs(0) {
      ...
    }

    sub foo_action :Args(0){
      my($self, $c) = @_;
      $c->stash->{object}; #object is here....
    }

The following methods must be provided by the consuming class:
"get_collection"

Chain link, captures one argument. Attempts to find a single object by passing the captured argument to the "find" method of the collection returned by "get_collection". If the object is found it is stored in the stash under the "object" key.

Reaction::UI::Controller
Reaction::UI::Controller::Role::GetCollection
Reaction::UI::Controller::Role::Action::Simple
Reaction::UI::Controller::Role::Action::List
Reaction::UI::Controller::Role::Action::View
Reaction::UI::Controller::Role::Action::Create
Reaction::UI::Controller::Role::Action::Update
Reaction::UI::Controller::Role::Action::Delete
Reaction::UI::Controller::Role::Action::DeleteAll

See Reaction::Class for authors.

See Reaction::Class for the license.

Hey! The above document had some coding errors, which are explained below:
Around line 61:
Unknown directive: =over4
Around line 63:
'=item' outside of any '=over'
Around line 78:
Unknown directive: =over4
Around line 80:
'=item' outside of any '=over'
2010-10-29 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

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