On Fri, 2002-08-30 at 17:31, Tripp Lilley wrote: > I'm trying to use a RadioField, but I'm composing the HTML for the field > by hand in a Cheetah template. How can I get the "selected" attribute for > a particular value to determine whether or not to write the "checked" > attribute? > > I've been reading the sources, and I'm currently blocked by these things: > > class SelectField (Field): > ... > def selected (self, key, default) > ... > > 1) What is "default" here?
If this is the first time through the form, the default value will be selected. So that's the default it's talking about. > 2) How can I (elegantly) get down to this method from a RenderableField? > RF seems to have wrappers around its self._field attributes and methods > for most common field bits, but not for "selected" :) This isn't really a resolved problem. Really, there should be a way to render the items in a radio field individually, instead of having to display the whole set at once. The only fields I can think of that need this are RadioField and MultiCheckboxField, both of which also don't need to be wrapped in anything (unlike a select box that needs <select></select> around the options). I'm not exactly sure what that accessor should look like. Ian ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
