vf pagination page can't offset the data

45 Views Asked by At

https://github.com/RuRu1229/paging-page

this is my page&apexCode

I want to do when I press the button,I can dispaly the (next/previous) five value In the screen. Now I have six value,but when I press the button. Although ,My page is rerender ,My value is only display the originally five value. After testing,I found the offsum will not renew. But I don't Know how can I change My code to achieve the Purpose. Can someBody help me?

I try to

 pageRef.getParameters().put('Offset', String.valueOf(offNum)); //

and hive off my soql to a founction

1

There are 1 best solutions below

0
eyescream On

You set the offset to be passed via URL but you never seem to read it? Your bondOfferingService method reads the ID - why not other params?

Have you seen the "proper" way to do pagination? https://developer.salesforce.com/docs/atlas.en-us.246.0.pages.meta/pages/pages_custom_list_controller.htm

And don't call your pages/classes "test", it can lead to amusing compilation errors because it'd clash with built-in System.Test class.