02-03-2011 05:33 AM
02-03-2011 07:16 AM
02-03-2011 07:46 AM
04-05-2012 02:25 AM
config : {
MSG_EMPTY : this.msg("message.nosearchresults"),
dynamicData : true,
generateRequest : this.bind(this.sortingResolver)
}This functions to me looks like sortingResolver : function Avtal_sortingResolver(sort, dataTable)
{
var url = '?', page = 0;
// First store the sort options
this.options.sortDir = (sort.sortedBy.dir === YAHOO.widget.DataTable.CLASS_DESC) ? "desc" : "asc";
this.options.sortKey = sort.sortedBy.key;
// Calculate the page offset. This is a bit odd, but works
page = (sort.pagination.page - 1) * sort.pagination.rowsPerPage;
url += this.pagingResolver(page, sort.pagination.rowsPerPage);
url += '&' + this.filterResolver(this.widgets.pagingDataTable.currentFilter);
if (Alfresco.logger.isDebugEnabled())
{
Alfresco.logger.debug("\nSorting url: " + url);
Alfresco.logger.debug("\nSorting pagination: " + page + ' ' + sort.pagination.rowsPerPage);
}
return url;
},This function in turn calls the pagingResolver and filterResolver to get the full url for the xhr request. What you need to add to those functions of course depends on how you are using the datatable. But this is the basics of what you need to do. this.widgets.pagingDataTable = new Alfresco.util.DataTable({
dataTable : {
container : this.id + "-searchTable",
columnDefinitions : [ {
key : "cm:name",
label : "Namn",
sortable : true,
formatter : this.bind(this.renderName)
}, {
key : "cm:title",
label : "Titel",
sortable : true,
formatter : this.bind(this.renderTitle)
},
04-05-2012 02:33 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.