On Mon, 29 May 2006 16:25:39 -0000 "Michele Cella" <[EMAIL PROTECTED]> wrote:
>
>
> Jason Chu wrote:
> > I'm still in the midst of upgrading from 0.9a4 to 0.9a6 and one of
> > the things I've noticed is that CompoundWidgets must have dict
> > values passed to them. If I pass something like a SQLObject object
> > the widget just ends up seeing {} as the value.
> >
> > Before, I could pass anything as the value and it'd be seen in the
> > update_params function, no matter if it was a CompoundWidget or not.
> >
> > Most of my CompoundWidgets are widgets that display complex data,
> > not ones that display disconnected data. I'd prefer to be able to
> > pass non-dict values to a widget and still be able to modify the
> > d['value'] inside the update_params function.
> >
> > Instead I've been forced to override the display method to do my
> > value manipulation.
> >
> > Suggestions?
> >
>
> Hi Jason,
>
> this was discussed inside tg-trunk, basically passing an instance is
> still working but I fear you haven't followed my advice of using
> member_widgets hence you're getting an empty dict.
>
> You should really consider using member_widgets + display_field_for
> inside your widget's template. ;-)
>
> Ciao
> Michele
When I get this problem, I am using member_widgets + display_field_for,
the problem is that the names of my columns don't always match up with
the widget names. Sometimes I don't even pass in a SQLObject object.
I was previously using my update_data (update_params) functions to
modify the data as I saw fit. Some of it was strictly for the widget
itself, not any of the sub-widgets. Other data was for sub-widgets as
well.
Jason
signature.asc
Description: PGP signature

