Whoa interesting style. How come you don't just use the fields directly? Why make your own compound widget? I am not sure the whole system of setting the params and stuff will work with how you are using them right there. And for the most part I was told to avoid using ForEach because usually that is done automatically for option oriented widgets(CheckBoxList for example).
-Ian On 9/25/06, Nicky Ayoub <[EMAIL PROTECTED]> wrote: > The change didn't work. The post by Ian is putting me on the right track. > The syntax for encoding a multiple select does not use sqaure braces. I > think the code in pagination.py needs to change the way it encodes lists > that are passed into it. I'll try to experiment there next. > Thanks for your help. > > On 9/25/06, Adam Jones <[EMAIL PROTECTED]> wrote: > > > > > > Try moving your int validator into the CheckBoxList instantiation. It > > will look something like this: > > > > class MyMacroFilterFormValidator(validators.Schema): > > macro = validators.String(not_empty=False, if_empty=''), > > designer = validators.String(not_empty=False, if_empty=''), > > > > class MyMacroFilterFormField(CompoundFormField): > > member_widgets = [ "macro","status", "designer"] > > template = """ > > <div xmlns:py="http://purl.org/kid/ns#"> > > <table border="1"> > > <tr> > > <th>Macro Name</th> > > <th>Status</th> > > <th>Designer</th> > > </tr> > > <tr> > > <td>${display_field_for(macro)}</td> > > <td>${display_field_for(status)}</td> > > <td>${display_field_for(designer)}</td> > > </tr> > > </table> > > </div> > > """ > > def __init__(self, m_params={}, s_params={}, d_params={}, *args, > > **kw): > > > super(MyMacroFilterFormField,self).__init__(*args,**kw) > > self.macro = TextField("macro", > > **m_params) > > self.status = CheckBoxList("status", > > options = [(0,'zero'), > > (1,'one'),(2,'two')], > > > validator=validators.Int(), > > **s_params) > > self.designer = TextField("designer", > > **d_params) > > > > > > > > G-Mail Account > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

