Is there a more efficient way of making pagination in Hibernate than executing select and count queries?

Baron Schwartz at MySQLPerformanceBlog.com authored a post about this. I wish there was a magic bullet for this problem, but there isn’t. Summary of the options he presented: On the first query, fetch and cache all the results. Don’t show all results. Don’t show the total count or the intermediate links to other pages. Show …

Read more

Changing pagination colour Bootstrap

.pagination > li > a { background-color: white; color: #5A4181; } .pagination > li > a:focus, .pagination > li > a:hover, .pagination > li > span:focus, .pagination > li > span:hover { color: #5a5a5a; background-color: #eee; border-color: #ddd; } .pagination > .active > a { color: white; background-color: #5A4181 !Important; border: solid 1px #5A4181 !Important; …

Read more

ui-bootstrap pagination resetting current page on initialization

So I found a solution after drilling down into the angular-bootstrap code. Their code has a watch on totalPages that checks if the current page is greater than the totalPages value. angular-bootstrap code: if ( $scope.page > value ) { $scope.selectPage(value); } else { ngModelCtrl.$render(); } What was happening was if I refreshed the page …

Read more