Introduction to the standard paging feature in SF

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.