You need to sign in to do that
Don't have an account?
Erik Rodgers
Which is the preferred method of pagination. ApexPages.StandardSetController or SOQL using Offset?
I'm looking into adding pagination capabilities to a couple of our visualforce pages and was wonder which is the preferred methods for accomplishing pagination. I've seen ApexPages.StandardSetController used as well as a method using SOQL offset. Which is best or good / bad of each? Thanks.
It's all about how you want to control the user experience and leverage the tools VF gives you. If you want VF to control the pagination - go with the StandardSetController. If you want to have more control, pass only the records you want to be rendered via OFFSET.
Heck, you could pass everything back via a standard or custom controller and use jQuery Datatables to handle all pagination client-side if you want.
Just my two cents. =)
All Answers
It's all about how you want to control the user experience and leverage the tools VF gives you. If you want VF to control the pagination - go with the StandardSetController. If you want to have more control, pass only the records you want to be rendered via OFFSET.
Heck, you could pass everything back via a standard or custom controller and use jQuery Datatables to handle all pagination client-side if you want.
Just my two cents. =)
Hi Andy Bottcher,
I have one doubt.If i would like to display 50 records on a page at atime and move forward and backward functionality through the list.
which is the preferred method(standardSetController or SOQL LIMIT with OFFSET).Please suggest me.