There is nothing in the world, no fuss. I like a relatively quiet environment to learn and work, I hope in a drop a needle sound can be heard in the environment, but sometimes often the opposite, a noisy, I can not change the environment around, only to change their own, in fact, these are nothing, perhaps my heart is very noisy, It makes me feel irritable to hear a little voice. On the good if water, calm peace and quiet.
Anyway
Standard paging features in SF:
SF has its own standard paging function, SF is a very well-developed cloud development platform, it has a lot of its own standard features, today I will be based on their understanding of the SF standard of the paging function of the fur.
define the Contet value associated to the foreground PublicConstructionmethod () {Contet= (list<letterinfo__c>) Con.getrecords ();} PublicApexpages.standardsetcontroller con{Get { if(Con = =NULL) {con=NewApexpages.standardsetcontroller (letterinfolist); //Sets the number of records in each page setCon.setpagesize (5); } returncon; } Set;} List<letterInfo__c>Contet; PublicList<letterinfo__c>Getcontet () {return(list<letterinfo__c>) con.getrecords ();
} //Indicates whether there is more records after the current page set. PublicBoolean hasnext{Get { returnCon.gethasnext (); } Set;
}//Indicates whether there is more records before the current page set. PublicBoolean hasprevious{Get { returncon.gethasprevious (); } Set;} //Returns the page number of the current page set PublicInteger pagenumber{Get { returnCon.getpagenumber (); } Set;} //returns the first page of records Public voidFirst () {Con.first ();}//returns the last page of records Public voidLast () {con.last ();}//returns the previous page of records Public voidPrevious () {con.previous ();}//returns the next page of records Public voidNext () {Con.next ();}//returns the pagereference of the original page, if known, or the home page. Public voidCancel () {Con.cancel ();} Integer totalpage; Publicinteger gettotalpage () {return(integer) Math.ceil ((Double) Letterread.size ()/5.00);}
Introduction to the standard paging feature in SF