On Apr 6, 2012, at 8:15 AM, Manuele Pesenti wrote:
>
> can you suggest a nice looking solution for easly introduce new buttons in
> grid and smartgrid when I'm in edit mode?
> This are an example of a button to introduce:
>
> my_extra_element_1 = FORM(INPUT(_type="submit", _value=T('Share data')),
> _action=URL('share_data_with_users', args=table_id))
>
> I would like to align with other button such as back, edit or view
>
> At the moment I use to do something like this:
>
> orm.components += [my_extra_element_1]
>
> but it's not a nice solution expecially if I got more than one element to
> introduce
On a related note, I was trying to do this, more or less, this morning, and I
thought I might try to explore the structure of the grid by displaying it with
BEAUTIFY. But of course (I guess of course) that gives me the presentation of
the form/table itself, not a breakdown of its structure.
I wonder if it wouldn't be straightforward to have a version of BEAUTIFY
(arguments? alternative version called DUMP?) that would suppress this behavior
and give us a dump of the object down to lower-level structures: dicts, lists,
etc? Or is there already some better way to explore the structure of a FORM or
SQLTABLE or whatever?