NAME

Catalyst::Helper::Controller::Scaffold::HTML::Template - Helper for Scaffolding using HTML::Template.

SYNOPSIS

    # Imagine you want to generate a scaffolding controller MyApp::C::SomeTable
    # for a CDBI table class MyApp::M::CDBI::SomeTable
    script/myapp_create.pl controller SomeTable Scaffold::HTML::Template CDBI::SomeTable

DESCRIPTION

This module is heavily based on Catalyst::Helper::Controller::Scaffold. It provides a framework to do the basic data operations (edit, view, list, delete, add).

Scaffolding is very simple with Catalyst, as most of the code will be automagically generated to handle the basic operations.

Let's say you want to handle the data in SomeTable, all you have to do is :

   script/myapp_create.pl controller SomeTable Scaffold::HTML::Template CDBI::SomeTable

this will create a controller for SomeTable using the model CDBI::SomeTable and all the required HTML::Template, namely :

   lib/myapp/C/SomeTable.pm
   root/SomeTable/add.tmpl
   root/SomeTable/edit.tmpl
   root/SomeTable/list.tmpl
   root/SomeTable/view.tmpl

Now just add these lines to your CDBI class...

    use Class::DBI::AsForm;
    use Class::DBI::FromForm;

...and modify the one in your application class, to load the FormValidator plugin.

    use Catalyst qw/-Debug FormValidator/;

You're done !

Just browse http://127.0.0.1:3000/sometable and enjoy the Catalyst's power : You can now add elements in SomeTable, view them, modify them, list them and delete them.

METHODS

mk_compclass

mk_compclass now accept a hashref as its last argument. This hash can be used to overrides all $helper attributes before calling its mk_dir and render_file methods

AUTHOR

Sebastian Riedel, Arnaud Assad

LICENSE

This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.

NAME

[% class %] - Scaffolding Controller Component

SYNOPSIS

See "[% app %]"

DESCRIPTION

Scaffolding Controller Component.

METHODS

add

Sets a template.

default

Forwards to list.

destroy

Destroys a row and forwards to list.

do_add

Adds a new row to the table and forwards to list.

do_edit

Edits a row and forwards to edit.

edit

Sets a template.

list

Sets a template.

view

Fetches a row and sets a template.

AUTHOR

[% author %]

LICENSE

This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.