[Catalyst] Example of a catalyst application using FormFu to createa table

Devin Austin devin.austin at gmail.com
Wed Jun 17 05:08:35 GMT 2009


Using FormFu this can be painful.

http://search.cpan.org/~snafufans/CatalystX-ListFramework-0.5/lib/CatalystX=
/ListFramework.pmwill
build you pretty tables of data.

hth,

Devin

On Tue, Jun 16, 2009 at 11:03 PM, Wilson Jason <Jason.Wilson at derm.qld.gov.au
> wrote:

>
> All,
>
> Unfortunately nobody has been able to help me with this.
>
> After much more trial and error I have something that almost works.
>
> An extract from the FromFu config looks like:
>  - type: Hidden
>    name: a_count
>
>  - type: Block
>    tag: table
>    attributes:
>      border: 1
>
>    elements:
>    - type: Repeatable
>      tag: tr
>      nested_name: list
>      counter_name: a_count
>      model_config:
>        empty_rows: 1
>
>      elements:
>      - type: Hidden
>        name: id
>
>      - type: Block
>        tag: td
>        elements:
>        - type: Text
>          name: relationship
>
>      - type: Block
>        tag: td
>        elements:
>        - type: Select
>          name: listnames
>
>      - type: Block
>        tag: td
>        elements:
>        - type: Checkbox
>          name: delete_me
> #          model_config:
> #              delete_if_true: 1
>
> This renders well enough for my purposes.
>
> The problem is that the option to 'delete_if_true' doesn't work. There
> is an error of the form:
> [error] Caught exception in Cubs::Controller::Cub->formfu_edit "element
> not found at
> /usr/local/lib/perl5/site_perl/5.10.0/HTML/FormFu/Model/DBIC.pm line
> 352"
>
> Reading the code here it would appear to be trying to find the relevant
> 'repeatable' for the model_config but cant as it is inside a nested
> Block.
>
> Any idea on how I might be able to work around this problem? I tried
> moving the 'delete_if_true' onto the 'Block', but it just ignores it.
>
> Thanks for any assistance,
>   Jason
>
>
> As of 26 March 2009 the Department of Natural Resources and
> Water/Environmental Protection Agency integrated to form the Department of
> Environment and Resource Management
>
> +----------------------------------------------------------------+
> Think B4U Print
> 1 ream of paper =3D 6% of a tree and 5.4kg CO2 in the atmosphere
> 3 sheets of A4 paper =3D 1 litre of water
> +----------------------------------------------------------------+
>
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



-- =

Devin Austin
http://www.codedright.net
http://www.dreamhost.com/r.cgi?326568/hosting.html - Host with DreamHost!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090616/5dff1=
9aa/attachment.htm


More information about the Catalyst mailing list