On Oct 4, 2006, at 5:09 PM, Gregor Horvath wrote:
>
> Alberto Valverde schrieb:
>
>> P.S: You can use a widget instead of a function. It will receive obj
>> as it's value and you can do all sorts of fancy stuff with it. Keep
>> in mind that calling a widget is the same as "display()"ing it.
>
> Thats nice but as far as I can see a DataGrid widget cannot be part
> of a
> form.
> What I would like to have is something like this
>
> class A(widgets.WidgetsList):
> author = widgets.TextField(label=_("Autor"))
> points = widgets.DataGrid(fields=[("Eingabe", widgets.TextField())])
>
> form = widgets.TableForm(fields=A())
>
> But this seems not to be possible because DataGrid is no InputWidget.
>
> Do I overlook something here?
Haven't tested it but you *might* get away with multiple inheritance:
class InputDataGrid(CompoundInputWidget, DataGrid):
pass
Alberto
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---