On Sep 5, 6:16 am, Jorge Godoy <[EMAIL PROTECTED]> wrote: > On Wednesday 05 September 2007 05:00:38 Diez B. Roggisch wrote: > > > But to be brutally honest: IMHO your whole approach is flawed. Because > > there is no such thing as a generic search. Making complex queries is > > always difficult to get right, especially when several clauses are involved > > etc. So I'd say - except from getting to know the tools of course - it's > > dead-end road you're walking there. > > I'd go for the traditional search box + radio button for where to search / > limit the search.
Thanks... I appreciate the comments. Jorge -- That was the idea -- a list containing allowable search fieldnames + a textbox to type something in. Controller has an exposed"find" method which determines the field and value to search for based on parameters from the request. What I'm trying to avoid is the necessity to do something like if searchBy == "field1": foo.select(field1=search) elif searchBy == "field2": foo.select(field2=search) or to have methods like searchByField1 searchByField2 which all themselves would contain painfully similar foo.select calls. Doesn't seem very DRY to me. :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

