Le 23/12/2007 03:37, Daniel Fetchinson a écrit :
> Hi list,
>
> It seems the paginate decorator doesn't work properly together with my
> widget that displays the data in a table. This is the controller I
> use:
>
> @paginate( 'data' )
> @expose( 'template.myproject.data' )
> def test( self ):
>     data = some_sqlobject_query_result
>     data_widget = mywidget( )
>     return dict( data=data, data_widget=data_widget )
>
> If I would be returning 'data' only the paginate decorator would do
> its job but if I use my widget for displaying the data then it
> doesn't, meaning that the full list is displayed. My understanding of
> the paginate decorator so far have been that it goes into the list (or
> query result) specified as its first argument and truncates that if
> necessarily and only the truncated list (or query result) is really
> returned by the controller. This is apparently not the case or did I
> misunderstand something?
>
>   
should not it be

@expose( 'template.myproject.data' )
@paginate( 'data' )
def test( self ):

so the pageinate decorator can filter the data passed to expose ??


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