Diez B. Roggisch wrote:
Am 05.03.10 17:57, schrieb Patricio Valarezo Lozano:
Hi friends, I'm trying to use toscawidgets for a mixed form with
WidgetLists or child widgets, where can I find code samples for widgets
constructed in real time?, or ways to manipulate the child widgets to
append widgets, the widget I want to acomplish has this layout:
FormTable:
TextField,
<widget list of SimpleSelectField constructed on object instantiation>
I don't understand this question.
Do you want to know how to dynamically set the optionlist of a
SingleSelectField?
If yes, use a callable as options-parameter. You can e.g. parametrize
that through the tmpl_context.
Normally, child_args=dict(field_name=dict(options=<list_of_options>))
should work, too, but AFAIK that's not working - a bug that I'm
investigating.
Diez
Not really, I want to make a kind of compount widget, with sub widgets
constructed from dynamic source, something like this:
class MainForm(FormTable):
name = TextField
def __init__(self,regs=[]):
for r in regs:
# create child widgets
regs = # some registers from the db
mf = MainForm(regs)
I hope this is more clear now,
thanks
--
patoVala
Linux User#280504
Hablando en http://www.elprimoalcahuete.com
"Are you a turtle?"
--
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?hl=en.