Hi, I only partially agree because one same controller has to supply the dictionary with all the data for all the widgets on that single page. I believe that it's not the right way to write reusable code. A controller method should be specialized for one purpose and should be reusable along with it's (partial) template to display on a "composed" page.
Marc On Jul 2, 11:07 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > On Tuesday 01 July 2008 15:35:35 mettwoch wrote: > > > Hi, > > > I've a question about merging multiple results from multiple > > controllers and templates together. The problem raises when I have a 1 > > to many relationship to represent. Let's say an invoice (with Nr, > > date, customer, ...) and below the invoice lines. I'ld like to have > > separate controllers for the invoice detail with a "form"template > > exposed and another controller with a "list"template exposed and get > > the page put together from these pieces. > > > How should I do it the right way? > > Separate controllers is not the way, at least not in TG. But you can use > Widgets to separate the representation of various items of your pages, and in > a controller gather data & widgets that you return then to be rendered in > your template. > > Diez --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

