0

Paging using connection

Is it possible to use the connection manager to get the results for the paging utility? I was looking through the documentation but did not find what I was looking for. Any help would be greatly appreciated.
CODE
var pag = new YAHOO.widget.Paginator({ 
rowsPerPage : 10,
totalRecords: 100,
containers : 'paging'
});

var MyApp = {
/* application API */
...

handlePagination : function (newState) {
// Collect page data using the requested page number
var pageContent = MyApp.getContent(newState.page);

// Update the content area
MyApp.replaceContent(pageContent);

// Update the Paginator's state
pag.setState(newState);
}
};

pag.subscribe('changeRequest',MyApp.handlePagination);

I think I can use the connection manaegr in the area that says "/* application API*/" but I am not sure.

Thanx a ton!

by
0 Replies

Recent Posts

in General Discussion at YDN