| Hi all, (I think) I need to use widgets. I _know_ that I don't know how. The turbogears mailing list contains a total of one email about widgets.Link, sadly that post seems totally unrelated to widgets.Link. I want to build a generic display of "self contained" Form widgets of different "types"(objects) - in the sense that the Form widget will be a representation of my object. Reading it back on POST/GET will reconstruct the "original" object. So the main idea is to create a "object mapping" for the object types: class MyObjectMapping(widgets.WidgetsDeclaration): def __init__(self,obj) super(MyObjectMapping,self).__init__(obj) if x: self.name = widgets.Label(name=obj.name) . . f = TableForm(fields=MyObjectMapping(obj)) and so on... Now, other than the fact that this does not work at all, it renders only the submit button - and that is after I've removed "obj" form super().__init__() or removed super all together , widgets.Link totally escapes me. My first assumption, that might or might not be correct, is that widgets.Link creates a <a href="">link</a> Based on this assumption I try to create a Link - only to be told that it needs at least one non-keyword parameter.... So...widgets.Link(1,name="myLink",path="http://www.google.com") does not initially fail, but when added to the TableForm I get AttributeError: Link object has no attribute label. And I get that error message with widgets.Link(1,name="myLink",path="http://www.google.com",label="MyLabel") and widgets.Link(1,name="myLink",path="http://www.google.com",attes={'label':'MyLabel'}) as well. Clearly, there's much that escapes me in the widgets multiverse. Can anyone enlighten me? regards /rune --------------------------------------------------------------------- Behind the firewall, nobody can hear you scream... --------------------------------------------------------------------- Behind the firewall, nobody can hear you scream... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- |

