+ Start a Discussion
DJ Rock your own styleDJ Rock your own style 

pagination failed when used with transient keyword



I ve created a vf page with pagination. To prevent the view state error, i ve included the keyword Transient in the standard set controller. Page loads fine but the following error is thrown on click of the links Next and last (for next page and last page):


Attempt to de-reference a null object.


Any suggestions??



Thanks n advance,




By making the standardsetcontroller transient, it won't be preserved between postbacks.  You might be able to workaround this by re-instantiating each time and the invoking the pagination action methods to get to the correct page, but that doesn't feel like the correct approach to me.