[Catalyst] Rails-like form helpers

Zbigniew Lukasiak zzbbyy at gmail.com
Thu Sep 21 09:04:14 CEST 2006


I don't know if I grap the idea of the helpers in full - could you explain
their functions here in short?  For me it looks like they just create form
elements just like the $w->element('...', '...') does.  There is something
also about using them for the updates - could you a bit elaborate on that?
HTML::Widget also works on the update side - at least can check the
constraints, but it does not set values of an object - do the RoR helpers?

In related news I am working on Catalyst::Example::InstantCRUD - a kind of
scaffolding for Catalyst with DBIx::Class as persistance layer.  It has some
code to autogenerate the forms from the DBIx::Class schema - but I am not
happy with it and just now I am restructuring it to use a config, generated
from the schema instead of using the schema directly.


On 9/20/06, Jon Warbrick <jw35 at cam.ac.uk> wrote:
> I've always admired the form helpers used by Rails (see [1]) - essentially
> helpers for use in templates for creating form controls that are linked to
> underlying model objects so that they can be pre-populated and so that the
> controls can be named to make subsequent update of the objects easy. It
> strikes me that something like this could be useful when creating forms
> that are more complex then solutions like HTMLWidget can conveniently cope
> with.
> Catalyst-Plugin-Params-Nested already provides support for something very
> like the Rails naming scheme, but I can't see anything that provides
> anything like the helpers themselves. Before I start creating something,
> probably as a DBIx::Class component, please can anyone tell me if I'm
> re-inventing the wheel?
> Jon.
> [1]
> http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M000389
> --
> Jon Warbrick
> Web/News Development, Computing Service, University of Cambridge
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/

Zbigniew Lukasiak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060921/99dee908/attachment.htm 

More information about the Catalyst mailing list