On Fri, Oct 17, 2008 at 7:10 AM, Matt Feifarek <[EMAIL PROTECTED]> wrote: > On Fri, Oct 17, 2008 at 5:12 AM, Toby Catlin <[EMAIL PROTECTED]> wrote: >> >> I am sure this has been done before but i am having trouble finding any >> references to existing code. As i don't want to reinvent the wheel i was >> hoping someone could point me to the right place. >> I have been building a reporting tool and i need to display lists of >> objects in some form of grid. The objects are very similar to those that >> would be returned from a database query eg: >> testId >> testName >> elapsedTime >> etc.. >> I simply need to display these values, preferably with paging. I guess >> that this would be very similar code to CRUD code.
I've made several table-layout functions over the years, but they get so complex with arguments to set the headers and classes and special cases that it's hard to make a simple generic function that's useful. And you don't really save that much vs laying out the table in the template. If you have several tables with a similar structure, you can make a Mako <%def> function, perhaps using the call-with-content feature to provide the row body. -- Mike Orr <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
