自己写的分页条(2)
来源:互联网 发布:java文件读写buffered 编辑:程序博客网 时间:2024/06/11 07:34
<mx:Metadata>
[Event(name="ChangeClickHandle", type="com.greenleaf.util.pagebar.event.ChangePageEvent")]
</mx:Metadata>
<mx:Script>
<![CDATA[
import com.greenleaf.util.WorkFlowConst;
import mx.rpc.remoting.RemoteObject;
import com.greenleaf.util.pagebar.event.ChangePageEvent;
[Bindable]private var currentPage:int;//当前页
[Bindable]private var sumPage:int;//总页数
[Bindable]private var totalRecords:Number=0;//总记录数
private var pageSize:int=WorkFlowConst.SIZE_PER_PAGE;
public function init(records:Number):void{
pageSize=pageSizePer.value;
totalRecords=records;
if (totalRecords != 0)
{
sumPage = Math.ceil(totalRecords / pageSize);
currentPage = 0;
}
else
{
currentPage = 0;
sumPage = 0;
}
}
private function queryData(whichPage:int):void{
pageSize=pageSizePer.value;
sumPage = Math.ceil(totalRecords / pageSize);
if (whichPage >= 0 && whichPage < sumPage){
currentPage=whichPage;
var startIndex:int = whichPage * pageSize;
var event:Event = new ChangePageEvent("ChangeClickHandle");
(ChangePageEvent(event))._pagecode = startIndex;
(ChangePageEvent(event))._pagesum = pageSize;
(ChangePageEvent(event))._currentPage = currentPage + 1;
dispatchEvent(event);
}
}
]]>
</mx:Script>
[Event(name="ChangeClickHandle", type="com.greenleaf.util.pagebar.event.ChangePageEvent")]
</mx:Metadata>
<mx:Script>
<![CDATA[
import com.greenleaf.util.WorkFlowConst;
import mx.rpc.remoting.RemoteObject;
import com.greenleaf.util.pagebar.event.ChangePageEvent;
[Bindable]private var currentPage:int;//当前页
[Bindable]private var sumPage:int;//总页数
[Bindable]private var totalRecords:Number=0;//总记录数
private var pageSize:int=WorkFlowConst.SIZE_PER_PAGE;
public function init(records:Number):void{
pageSize=pageSizePer.value;
totalRecords=records;
if (totalRecords != 0)
{
sumPage = Math.ceil(totalRecords / pageSize);
currentPage = 0;
}
else
{
currentPage = 0;
sumPage = 0;
}
}
private function queryData(whichPage:int):void{
pageSize=pageSizePer.value;
sumPage = Math.ceil(totalRecords / pageSize);
if (whichPage >= 0 && whichPage < sumPage){
currentPage=whichPage;
var startIndex:int = whichPage * pageSize;
var event:Event = new ChangePageEvent("ChangeClickHandle");
(ChangePageEvent(event))._pagecode = startIndex;
(ChangePageEvent(event))._pagesum = pageSize;
(ChangePageEvent(event))._currentPage = currentPage + 1;
dispatchEvent(event);
}
}
]]>
</mx:Script>
- 自己写的分页条(2)
- 自己写的分页条
- 自己写的分页条(3)
- 自己写的分页
- 自己写的分页代码
- 自己写的一个分页
- 自己写的数据分页
- 自己写的freemarker分页
- 自己写的分页类
- 写自己的分页控件
- 自己写的实现分页的控件
- 自己写的基本滚动条类
- 自己写的div滚动条
- php自己写的分页类:::>>>
- 自己写的一个分页程序
- 自己写的一个分页程序
- 自己写的javabean分页呵呵
- 自己写的分页Util类
- 揭开J2EE集群的神秘面纱(五)
- XML(2012/2/15)
- 程序员必备 几个国外IT网站
- 图的广度优先搜索来求从一个城市到另一个城市的路径及其所经过城市最少
- 欧几里得算法
- 自己写的分页条(2)
- 中断函数int request_irq(...)
- 在VS2008环境下使用Scons编译NSIS
- 揭开J2EE集群的神秘面纱(六)
- 自己写的分页条(3)
- 揭开J2EE集群的神秘面纱(七)
- android listview的下拉加载
- 高级编程语言的发展历程
- WAS ND节点同步故障解决