首页 > web前端 > html教程 > Flex真真的分页,一个页面支持多次复用_html/css_WEB-ITnose

Flex真真的分页,一个页面支持多次复用_html/css_WEB-ITnose

WBOY
发布: 2016-06-24 11:54:53
原创
1217 人浏览过

<?xml version="1.0" encoding="utf-8"?><hbox xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationcomplete="initHandler(event)" width="100%" height="300" backgroundcolor="0xffffff">	<script>		 1)				{					pageFirstBtn.enabled = true;					pagePreBtn.enabled = true;					pageNextBtn.enabled = true;					pageLastBtn.enabled = true;					pageRefreshBtn.enabled = true;				}				else if(curPage == totalPage)				{					pageFirstBtn.enabled = true;					pagePreBtn.enabled = true;					pageNextBtn.enabled = false;					pageLastBtn.enabled = false;					pageRefreshBtn.enabled = true;				}			}						/**			 * 服务请求成功的处理			 */			private function serviceSuccessResult(event:ResultEvent):void			{				totalCount = event.result.totalCounts;				items = event.result.entityList as ArrayCollection;				trace(url,"",items);			}						/**			 * 服务请求失败的处理			 */			private function httpServiceFault(event:FaultEvent):void			{				Alert.show(event.fault.message,"服务请求失败");			}						/**			 * 发送服务请求			 */			private function pagingRemoteObject():void			{				var remote:RemoteObject = new RemoteObject(destination);				offSet = (curPage - 1)*pageSize;				remote.getOperation(methodName).send(pageSize,offSet);				remote.addEventListener(ResultEvent.RESULT,serviceSuccessResult);				remote.addEventListener(FaultEvent.FAULT,httpServiceFault);			}						/**			 * 			 */			private function loadingDatagrid():void			{							}		]]>	</script>	<declarations>		<!-- 将非可视元素(例如服务、值对象)放在此处 -->	</declarations>		<hbox width="30%" height="100%" verticalalign="middle">		<linkbutton stylename="pageFirstBtn" id="pageFirstBtn" enabled="false" click="pageFirstClickHandler(event)"></linkbutton>		<linkbutton stylename="pagePreBtn" id="pagePreBtn" enabled="false" click="pagePrevClickHandler(event)"></linkbutton>		<linkbutton stylename="pageNextBtn" id="pageNextBtn" enabled="false" click="pageNextClickHandler(event)"></linkbutton>		<linkbutton stylename="pageLastBtn" id="pageLastBtn" enabled="false" click="pageLastClickHandler(event)"></linkbutton>	</hbox>		<hbox width="40%" height="100%" verticalalign="middle">		<label text="Page"></label>		<numericstepper id="pageStepper" width="78" click="pageStepperClickHandler(event)" maximum="{totalPage}" minimum="{getMinimum()}" value="{curPage}"></numericstepper>		<label text="of"></label>		<label id="totalPageLab" text="{totalPage}"></label>	</hbox>		<hbox verticalalign="middle">		<combobox dataprovider="{pageSizeBoxListData}" selectedindex="1" width="60" labelfield="pageSize" id="pageSizeComboBox" change="pageSizeComboboxChangeHandler(event)"></combobox>		<label text="共{totalCount}条 记录"></label>	</hbox>		<linkbutton stylename="pageRefreshBtn" id="pageRefreshBtn" click="pageRefreshClickHandler(event)"></linkbutton>		</hbox>    <bordercontainer x="0" y="0" width="40%" height="20" bordercolor="0x336699" textalign="center" visible="false">		<group id="hgimg" x="0" y="0" width="100%" height="100%" clipandenablescrolling="true">			<hbox width="60%" height="18" stylename="progressBarPageBlue" id="progressBarPageBlue">							</hbox>			<hbox width="96%" height="100%" paddingleft="3" x="2" horizontalalign="center" verticalalign="middle">				<label text="Displaying "></label>				<label text="{pageSize*curPage - 1 - pageSize}" id="pageStartLab"></label>				<label text="-"></label>				<label text="{pageSize*curPage - 1}" id="pageSizeLab"></label>				<label text="of"></label>				<label text="{totalCount}" id="allRecordsLab"></label>			</hbox>			<hbox width="100%" height="100%" click="progressBarClickHandler(event)" verticalalign="middle">							</hbox>		</group>	</bordercontainer>
登录后复制


来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板