SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Catalyst-Controller-FormBuilder rpm build for : openSUSE Leap 42. For other distributions click perl-Catalyst-Controller-FormBuilder.

Name : perl-Catalyst-Controller-FormBuilder
Version : 0.06 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : 3.1 Date : 2015-11-22 16:37:16
Group : Development/Libraries/Perl Source RPM : perl-Catalyst-Controller-FormBuilder-0.06-3.1.src.rpm
Size : 0.03 MB
Packager : (none)
Summary : Catalyst FormBuilder Base Controller
Description :
This base controller merges the functionality of *CGI::FormBuilder* with
Catalyst and the following templating systems: Template Toolkit, Mason and
HTML::Template. This gives you access to all of FormBuilder\'s niceties,
such as controllablefield stickiness, multilingual support, and Javascript
generation. For more details, see the CGI::FormBuilder manpage or the
website at:

http://www.formbuilder.org

FormBuilder usage within Catalyst is straightforward. Since Catalyst
handles page rendering, you don\'t call FormBuilder\'s \'render()\' method, as
you would normally. Instead, you simply add a \':Form\' attribute to each
method that you want to associate with a form. This will give you access to
a FormBuilder \'$self->formbuilder\' object within that controller method:


sub edit : Local Form {
my ( $self, $c ) = AATT_;
$self->formbuilder->method(\'post\'); # set form method
}

The out-of-the-box setup is to look for a form configuration file that
follows the the CGI::FormBuilder::Source::File manpage format (essentially
YAML), named for the current action url. So, if you were serving
\'/books/edit\', this plugin would look for:

root/forms/books/edit.fb

(The path is configurable.) If no source file is found, then it is assumed
you\'ll be setting up your fields manually. In your controller, you will
have to use the \'$self->formbuilder\' object to create your fields,
validation, and so on.

Here is an example \'edit.fb\' file:


name: books_edit
method: post
fields:
title:
label: Book Title
type: text
size: 40
required: 1
author:
label: Author\'s Name
type: text
size: 80
validate: NAME
required: 1
isbn:
label: ISBN#
type: text
size: 20
validate: /^(\\d{10}|\\d{13})$/
required: 1
desc:
label: Description
type: textarea
cols: 80
rows: 5

submit: Save New Book

This will automatically create a complete form for you, using the specified
fields. Note that the \'root/forms\' path is configurable; this path is used
by default to integrate with the \'TTSite\' helper.

Within your controller, you can call any method that you would on a normal
\'CGI::FormBuilder\' object on the \'$self->formbuilder\' object. To manipulate
the field named \'desc\', simply call the \'field()\' method:


$self->formbuilder->field(
name => \'desc\',
label => \'Book Description\',
required => 1
);

To populate field options for \'country\', you might use something like this
to iterate through the database:

$self->formbuilder->field(
name => \'country\',
options =>
[ map { [ $_->id, $_->name ] } $c->model(\'MyApp::Country\')->all ],
other => 1, # create \"Other:\" box
);

This would create a select list with the last element as \"Other:\" to allow
the addition of more countries. See the CGI::FormBuilder manpage for
methods available to the form object.

The FormBuilder methodolody is to handle both rendering and validation of
the form. As such, the form will \"loop back\" onto the same controller
method. Within your controller, you would then use the standard FormBuilder
submit/validate check:

if ( $self->formbuilder->submitted && $self->formbuilder->validate ) {
$c->forward(\'/books/save\');
}

This would forward to \'/books/save\' if the form was submitted and passed
field validation. Otherwise, it would automatically re-render the form with
invalid fields highlighted, leaving the database unchanged.

To render the form in your tt2 template for example, you can use \'render\'
to get a default table-based form:

< !-- root/src/books/edit.tt -->
[% FormBuilder.render %]

You can also get fine-tuned control over your form layout from within your
template.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/openSUSE_Leap_42.1/noarch

Content of RPM  Changelog  Provides Requires

Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server

Provides :
perl(Catalyst::Controller::FormBuilder)
perl(Catalyst::Controller::FormBuilder::Action)
perl(Catalyst::Controller::FormBuilder::Action::HTML::Template)
perl(Catalyst::Controller::FormBuilder::Action::Mason)
perl(Catalyst::Controller::FormBuilder::Action::TT)
perl-Catalyst-Controller-FormBuilder

Requires :
rpmlib(CompressedFileNames) <= 3.0.4-1
perl(Test::WWW::Mechanize::Catalyst) => 0.37
rpmlib(PayloadIsLzma) <= 4.4.6-1
perl(Tie::IxHash) => 1.21
perl(Catalyst::Runtime) => 5.7
perl(:MODULE_COMPAT_5.18.2)
perl(CGI::FormBuilder) => 3.02
perl(MRO::Compat) => 0.09
perl(Scalar::Util) => 1.19
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
perl(Class::Inspector) => 1.13
perl(Class::Data::Inheritable) => 0.04


Content of RPM :
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst/Controller
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst/Controller/FormBuilder
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst/Controller/FormBuilder.pm
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst/Controller/FormBuilder/Action
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst/Controller/FormBuilder/Action.pm
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst/Controller/FormBuilder/Action/HTML
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst/Controller/FormBuilder/Action/HTML/Template.pm
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst/Controller/FormBuilder/Action/Mason.pm
/usr/lib/perl5/vendor_perl/5.18.2/Catalyst/Controller/FormBuilder/Action/TT.pm
/usr/lib/perl5/vendor_perl/5.18.2/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Catalyst-Controller-FormBuilder
/usr/share/doc/packages/perl-Catalyst-Controller-FormBuilder/Changes
/usr/share/man/man3/Catalyst::Controller::FormBuilder.3pm.gz

 
ICM