Working with the latest TurboGears and Python 2.5.1.. having this
problem:
- When creating a list of RadioButtonList widgets, the default value
doesn't seem to be able to be set. In other words if I do something
like:
widgetList = []
widgetList.append(widgets.RadioButtonList(options=[(1, "Python"),
(2, "Java"),
(3, "Pascal"),
(4, "Ruby")],
default=4))
where I then try to render the list by doing something in a kid
template like:
<span py:for="item in widgetList">
${item.display()}
</span>
or even something more explicit like:
<span py:for="item in widgetList">
${tcb.display(value_for(tcb), **params_for(tcb))}
</span>
I get the radio button items, labels, etc, as they should be; but none
selected as default. If I swap out the RadioButtonList widget for a
CheckBoxList widget, I get the appropriate box checked...
Any ideas? Basically, I'm dynamically rendering a whole list of radio
sets and need to select their appropriate value... I've tried all
kinds of things and have bolled this problem down this this simple
example.
Cheers,
John
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---