Can someone assist us regarding the error message we get. It seems that obj.hasPrevious doesn't have a value. How can we put a condition here that it will return the hasPrevious method if it has a value.
This code is for pagination. Rendering of buttons in VF Page
System.NullPointerException: Attempt to de-reference a null object Class.SearchAdmin2Ctrl.__sfdc_hasPrevious: line 1353, column 1
CONTROLLER:
public Boolean hasPrevious{
get { return obj.hasPrevious();} set;
}
CUSTOMITERABLE CLASS THAT IMPLEMENTS ITERATOR:
// for rendering previous button
global boolean hasPrevious(){
system.debug('I am in hasPrevious' + i);
if(i <= setPageSize) {
return false;
} else {
return true;
}
}
VF PAGE:
<apex:commandButton value="< Previous" action="{!previous}" rendered=" {!hasPrevious}" reRender="btable" />
Thank you so much!!