Heya,

I'm having a problem getting AjaxPaginatedGrid to work. The demo in
the toolbox works perfectly, but no matter how closely I emulate the
example source, I cannot get my implementation to paginate. It
initially fills the grid correctly but doesn't show any other pages
but the first, with no response from any of the controls. This is with
TGPaginate 0.1a0.dev-r663 under TG 1.0.2.2.

Here's the code I'm having problems with:

class Root(controllers.RootController):

    example_list = [(x,x) for x in range(10,200)]

    @expose(format='json')
    @paginate('example_list')
    def lister(self, *args, **kw):
        return dict(example_list = self.example_list)

    @expose(template='project.templates.list')
    def list(self, *args, **params):
        grid = AjaxPaginatedGrid(
            name='list_grid',
            url='lister',
            var_name='example_list',
            fields=[('C1', lambda x: x[0]),
                ('C2', lambda x: x[1])]
            )
        return dict(grid=grid)

I can pass pagination parameters directly to the lister method and it
returns the expected subset of results. I've tried it with a Kid
template because I thought the problem might lie with Genshi, but the
behaviour is identical for both: the APG reports 0/0 pages and only
holds the first 10 items

What am I missing? Are there additional JS dependencies that
AjaxPaginatedGrid isn't bringing in by default that are being linked
in by the other example widgets?

Any help would be greatly appreciated.

-alex23


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to