FAQ
Hello All,

Recently come across the whole Catalyst framework and very impressed
with what can be done with it. Am an avid perl programmer so glad to
find a framework to cater for my language of choice.

Have worked through the tutorial and have my own basic application
working - thanks all.

The problem I having is trying to get a edit form with a 'table' like
structure to display nicely.

Have created a repeatable element with the relevant sub-elements, but
whatever combination of tags, CSS style, etc I cant seem to get anything
that looks right.

Can anyone point me to an existing application that displays data in a
table nicely? Sort of like a very simple spreadsheet?

Thanks in advance,
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 = 6% of a tree and 5.4kg CO2 in the atmosphere
3 sheets of A4 paper = 1 litre of water
+----------------------------------------------------------------+

Search Discussions

  • Wilson Jason at Jun 17, 2009 at 5:03 am
    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 = 6% of a tree and 5.4kg CO2 in the atmosphere
    3 sheets of A4 paper = 1 litre of water
    +----------------------------------------------------------------+
  • Devin Austin at Jun 17, 2009 at 5:08 am
    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 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 = 6% of a tree and 5.4kg CO2 in the atmosphere
    3 sheets of A4 paper = 1 litre of water
    +----------------------------------------------------------------+



    _______________________________________________
    List: Catalyst@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/5dff19aa/attachment.htm
  • Carl Franks at Jun 17, 2009 at 7:52 am

    2009/6/17 Wilson Jason <Jason.Wilson@derm.qld.gov.au>:

    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"
    Hi,

    This is already fixed in svn - r1528
    And will be in the next cpan release.

    Cheers,
    Carl
  • Wilson Jason at Jun 18, 2009 at 12:07 am

    Carl Franks wrote:
    2009/6/17 Wilson Jason <Jason.Wilson@derm.qld.gov.au>:
    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"
    Hi,

    This is already fixed in svn - r1528
    And will be in the next cpan release.
    Thanks very much for that. Just grabbed down the latest DBIC.pm from the
    SVN repository and threw it in. This will be sufficient for my testing
    (toy application just for myself).

    Works great now.

    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 = 6% of a tree and 5.4kg CO2 in the atmosphere
    3 sheets of A4 paper = 1 litre of water
    +----------------------------------------------------------------+

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJun 12, '09 at 5:23a
activeJun 18, '09 at 12:07a
posts5
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase