26 Sep 2005 10:13:33 UTC
- Distribution: Maypole-FormBuilder
- Module version: 0.44
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (11)
- Testers (187 / 1 / 0)
- KwaliteeBus factor: 0
- 100.00% Coverage
- License: perl_5
- Download (36.75KB)
- MetaCPAN Explorer
- Subscribe to distribution
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- This version
- Latest version
- David Baird
Why not adopt me?This distribution is up for adoption! If you're interested then please contact the PAUSE module admins via email.
Maypole::FormBuilder - CGI::FormBuilder support in Maypole
use Maypole::Application qw( FormBuilder QuickTable ); BeerFB->config->model( 'Maypole::FormBuilder::Model' );
Maypole provides a great framework for simplifying the interaction between a UI and a database. But it provides very little support for simplifying the interface itself. Programmers are left to construct each form, widget by widget, using modules that don't support important form use cases, such as what to do when a form submits nothing for an empty field.
This distribution uses Class::DBI::FormBuilder to generate the metadata required to automatically build FormBuilder forms from CDBI classes and objects.
The distribution includes:
Introductory documentation only.
as_formsmethods for the Maypole request object.
Model methods that do not depend on the CDBI backend. Models based on a different persistence layer may wish to inherit from this class.
A new set of templates for the Beer database. These are considerably simpler than the BeerDB templates.
templates-mason Mason templates templates-tt TT templates, donated by Ron McClain
Note that the templates also need Maypole::Plugin::QuickTable.
Also note, TT users must bless an object called
$request->model_classand add it to the template vars in
additional_data(). This is to make
monikerwork, which will always return
Proxyif if you do
[% mclass = Class(request.model_class) %]because
Classcreates a Proxy object around the model class.
If you build a form, and it has no 'name' or 'id' defined, you have probably called
as_formon a CDBI class or object, rather than on the Maypole request object. I often do this when building a form for a different object or class from that represented in the request. Use the 'entity' argument to Maypole::Plugin::FormBuilder::as_form() to do this.
Edit and update actions from the editable list template are broken.
After creating or editing an object, if the return is to a list template, need to ensure the appropriate page is set. Or just go back to the original workflow and display the
The development version of Class::DBI::Plugin::Pager (which is the version I have installed) has a bug, so I haven't been able to test using it via the
Please report any bugs or feature requests to
email@example.com, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Maypole-FormBuilder. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Most links from the
editlisttemplate return the user to the
listtemplate, rather than staying in the
Copyright 2005 David Baird, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Maypole::FormBuilder, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Maypole::FormBuilder
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|