I am referring below link for custom pagination for next & previous , but would like to know how first and Last page navigation will work. Any help is appreciated. paginate a wrapper class
In the you are referring, there are two
commandButton with value '|<' and '>|'. These value are for First Page and Last Page.
When you use setCon of type
ApexPages.StandardSetController, There are predefined methods for 'Next', 'Previous', 'First' and 'Last'.
Please follow this link for more details about using
ApexPages.StandardSetController for pagination.
And In the case of custom iterator, First and Last method will work same as Next() method, Only you need to set your startIndex to '0' in the case of First() and in the case Last() set startIndex to =
sizeOfYourList - pageSize - 1