zoukankan      html  css  js  c++  java
  • sf中标准的分页功能介绍

      世上本无事,庸人自扰之。我喜欢一个相对比较安静的环境去学习和工作,希望在一个掉一根针的声音都能够听到的环境中,但是有时候往往相反,一片嘈杂,我改变不了周围的环境,只能改变自己,其实这些都没有什么,也许是我内心就很嘈杂,使我听到一点点声音就感觉很烦躁。上善若水,心静则情静继而人静。

      言归正传:

      sf中标准的分页功能:

      sf有自己标准的分页功能,sf真是个功能相当完善的云端开发平台,其有好多自己标准的功能,今天我就根据自己的理解先介绍一下sf标准的分页功能的皮毛。

      

    定义关联到前台的Contet值
    public ConstructionMethod(){
        Contet=(List<letterInfo__c>) con.getRecords();
    }
    public ApexPages.StandardSetController con{
        get {
            if(con == null) {
                con = new ApexPages.StandardSetController(letterInfoList);
                // sets the number of records in each page set
                con.setPageSize(5);
            }
            return con;
         }
         set;
    }     
    List<letterInfo__c> Contet;
    public List<letterInfo__c> getContet(){
        return (List<letterInfo__c>) con.getRecords();
    }
    // indicates whether there are more records after the current page set. public Boolean hasNext{ get { return con.getHasNext(); } set;
    }
    // indicates whether there are more records before the current page set. public Boolean hasPrevious{ get { return con.getHasPrevious(); } set; } // returns the page number of the current page set public Integer pageNumber{ get { return con.getPageNumber(); } set; } // returns the first page of records public void first(){ con.first(); } // returns the last page of records public void last(){ con.last(); } // returns the previous page of records public void previous(){ con.previous(); } // returns the next page of records public void next(){ con.next(); } // returns the PageReference of the original page, if known, or the home page. public void cancel(){ con.cancel(); } integer totalPage; public integer getTotalPage(){ return (integer)Math.ceil((double)letterRead.size()/5.00); }
  • 相关阅读:
    在数据库里进行分页处理
    new Date()在IE,谷歌,火狐上的一些注意项
    sql的一些小东西
    将sql数据库逆向生成PDM模型
    关于禁止在 .NET Framework 中执行用户代码。启用 "clr enabled" 配置选项
    MVC的Model层中的一些便签
    通过URL推送POST数据
    Python 关键字
    Python 标识符
    Python 注释(Python Comments)用法详解
  • 原文地址:https://www.cnblogs.com/yuxin-555xt/p/sf_standardPaging.html
Copyright © 2011-2022 走看看