NAME
Reaction::UI::Controller::CRUD - Basic CRUD functionality for Reaction::InterfaceModel data
DESCRIPTION
Controller class which extends Reaction::UI::Controller::Collection to provide basic Create / Update / Delete / DeleteAll actions.
Building on the base of the Collection controller this controller allows you to easily create complex and highly flexible CRUD functionality for your InterfaceModel models by providing a simple way to render and process your custom InterfaceModel Actions and customize built-ins.
METHODS
get_model_action $c, $action_name, $target_im
Get an instance of the $action_name
InterfaceModel::Action for model $target
This action is suitable for passing to an Action|Reaction::UI::ViewPort::Action
viewport
after_create_callback $c, $vp, $result
When a <create> action is applied, move the user to the new object's, update
page.
basic_model_action $c, \%vp_args
Extension to basic_page
which automatically instantiates an InterfaceModel::Action with the right data target using get_model_action
_build_action_viewport_map
Map create
, update
, delete
and delete_all
to use the Action viewport by default and have list
use ListView by default.
_build_default_member_actions
Add update
and delete
to the list of default actions.
_build_default_collection_actions
Add create
and delete_all
to the list of default actions.
ACTIONS
create
Chaned to base
. Create a new member of the collection represented by this controller. By default it attaches the after_create_callback
to DWIM after apply operations.
See Create for more info.
delete_all
Chained to base, delete all the members of the collection. In most cases this is very much like a TRUNCATE
operation.
See DeleteAll for more info.
update
Chained to object
, update a single object.
See Update for more info.
delete
Chained to object
, delete a single object.
See Delete for more info.
SEE ALSO
Reaction::UI::Controller::Collection, Reaction::UI::Controller
AUTHORS
See Reaction::Class for authors.
LICENSE
See Reaction::Class for the license.