xworker.html.jqueryesayui.base.pagination
事物 pagination(pagination)点击打开事物点击浏览描述

描述者:
MetaDescriptor3
thing
继承:
EasyUIThing

Override defaults with $.fn.pagination.defaults.

The pagination allows the user to navigate data by page. It supports configurable options for page navigation and page length choices. The user can add customize buttons on right of pagination to enhance its functionality.

Dependencies

Usage Example

Create pagination from markup.

 
  1. <div id="pp" class="easyui-pagination" data-options="total:2000,pageSize:10" style="background:#efefef;border:1px solid #ccc;"></div>  

Create pagination using javascript.

 
  1. <div id="pp" style="background:#efefef;border:1px solid #ccc;"></div>  
 
  1. $('#pp').pagination({  
  2.     total:2000,  
  3.     pageSize:10  
  4. });  

Let's create ajax pagination with panel and pagination plugins. When the user select a new page, the panel will display the corresponding content of specified page.

 
  1. <div id="content" class="easyui-panel" style="height:200px"  
  2.         data-options="href:'show_content.php?page=1'">  
  3. </div>  
  4. <div class="easyui-pagination" style="border:1px solid #ccc;"  
  5.         data-options="  
  6.             total: 2000,  
  7.             pageSize: 10,  
  8.             onSelectPage: function(pageNumber, pageSize){  
  9.                 $('#content').panel('refresh', 'show_content.php?page='+pageNumber);  
  10.             }">  
  11. </div>  

The panel on top display the first page content by default. When the user navigate the page, the 'onSelectPage' event will be triggered, in which we call 'refresh' method for the content panel to load new page content with a new URL parameter.

字段摘要
           String afterPageText
           Show a label after the input component.
           String beforePageText
           Show a label before the input component.
           String displayMsg
           Display a page information.
           String generateDiv
           是否先生成一个DIV。
           String id
           对应的div的id属性值。
           String label
           
           String loading
           Defines if data is loading.
           String name
           
           String otherAttributes
           一些其他属性,如:
           String pageList
           User can change the page size. The pageList property defines how many size can be changed.
           String pageNumber
           Show the page number when pagination is created.
           String pageSize
           The page size.
           String showPageList
           Defines if to show page list.
           String showRefresh
           Defines if to show refresh button.
           String style
           html的style属性,如:
           String total
           The total records, which should be setted when pagination is created.
 
方法摘要
           getClass
          

返回EsayUI的class名称,一般是easyui-draggable,其中draggable是事物名的小写。

           getHtmlTag
          

一般EasyUi事物对应的html标签是div,如果有其他的,比如form中的元素,那么可能是input,则需要重载此方法。

           toHtml
          
           toJavaScriptCode
          
 
子事物摘要
           ExtJs
          EXtjs组件。
           FormLayout(表单布局)
           表单布局使用Table布局,表单布局认为子事物都含有标签和输入,因此表单布局默认。
           HtmlTag
          可以自定义简单的HTML标签。
           JavaScript
          作用
           XWRemoteSupport
          提供打开窗口、打开TabItem等功能。
           button(按钮)
          
           buttons
          Defines customize buttons, each button contains two properties:
           checkBox(复选框)
          
           code(代码)
          可以直接编辑HTML的地方。
           comboBox(下拉框)
          
           dateInput(日期输入)
          
           diagram(图表)
          
           div
          简单的div标签。
           form(表单)
          
           grid(数据格)
          
           hidden(隐藏输入)
          隐藏字段。
           htmlCode(HTML代码)
          通过XWorker内置的HTML编辑器编写HTML代码。
           label(标签)
          
           list(列表)
          
           menu(菜单)
          
           onBeforeRefresh
          Fires before the refresh button is clicked, return false to cancel the refresh action.
           onChangePageSize
          Fires when user change the page size.
           onRefresh
          Fires after refresh.
           onSelectPage
          Fires when user select a new page. callback function contains two parameter:
           password(密码框)
          
           radioButton(选项按钮)
          
           span
          简单的span标签。
           table(表格)
          
           textArea(文本区)
          
           textField(文本框)
          
           yui-ext
          
 
字段详细信息

afterPageText点击打开事物

Show a label after the input component.


beforePageText点击打开事物

Show a label before the input component.


displayMsg点击打开事物

Display a page information.


generateDiv点击打开事物

是否先生成一个DIV。


id点击打开事物

对应的div的id属性值。


label点击打开事物


loading点击打开事物

Defines if data is loading.


name点击打开事物


otherAttributes点击打开事物

一些其他属性,如:

onClick="javascript:void(0)" align="left"


pageList点击打开事物

User can change the page size. The pageList property defines how many size can be changed.

Code example:

$('#pp').pagination({
	pageList: [10,20,50,100]
});

pageNumber点击打开事物

Show the page number when pagination is created.


pageSize点击打开事物

The page size.


showPageList点击打开事物

Defines if to show page list.


showRefresh点击打开事物

Defines if to show refresh button.


style点击打开事物

html的style属性,如:

width:100px;height:100px;


total点击打开事物

The total records, which should be setted when pagination is created.


 
方法详细信息

getClass

返回EsayUI的class名称,一般是easyui-draggable,其中draggable是事物名的小写。


getHtmlTag

一般EasyUi事物对应的html标签是div,如果有其他的,比如form中的元素,那么可能是input,则需要重载此方法。


toHtml


toJavaScriptCode


 
子事物详细信息

ExtJs点击打开事物

EXtjs组件。


FormLayout(表单布局)点击打开事物

 表单布局使用Table布局,表单布局认为子事物都含有标签和输入,因此表单布局默认。


HtmlTag点击打开事物

可以自定义简单的HTML标签。


JavaScript点击打开事物

作用

用于生成JavaScript代码片段,所有能够生成JavaScript代码片段的都应注册到此子事物下。

JavaScript注册

所有能够生成 JavaScript代码的事物都应该注册到本事物下。

重载toHtml方法

如果一个事物继承了JavaScript并且只是用于生成JavaScript代码的,那么应该重载toHtml方法,返回在toHtml方法里返回null,可以使用NOOP动作。


XWRemoteSupport点击打开事物

提供打开窗口、打开TabItem等功能。


button(按钮)点击打开事物


buttons点击打开事物

Defines customize buttons, each button contains two properties:
iconCls: the CSS class which will show a background image
handler: a handler function when button is clicked

The customize buttons can be declared from markup:

<div class="easyui-pagination" style="border:1px solid #ccc" data-options="
		total: 114,
		buttons: [{
			iconCls:'icon-add',
			handler:function(){alert('add')}
		},'-',{
			iconCls:'icon-save',
			handler:function(){alert('save')}
		}]">
</div>

The customize buttons can also be created using javascript:

$('#pp').pagination({
	total: 114,
	buttons: [{
		iconCls:'icon-add',
		handler:function(){alert('add')}
	},'-',{
		iconCls:'icon-save',
		handler:function(){alert('save')}
	}]
});

checkBox(复选框)点击打开事物


code(代码)点击打开事物

可以直接编辑HTML的地方。


comboBox(下拉框)点击打开事物


dateInput(日期输入)点击打开事物


diagram(图表)点击打开事物


div点击打开事物

简单的div标签。


form(表单)点击打开事物


grid(数据格)点击打开事物


hidden(隐藏输入)点击打开事物

隐藏字段。

htmlCode(HTML代码)点击打开事物

通过XWorker内置的HTML编辑器编写HTML代码。


label(标签)点击打开事物


list(列表)点击打开事物


menu(菜单)点击打开事物


onBeforeRefresh点击打开事物

Fires before the refresh button is clicked, return false to cancel the refresh action.


onChangePageSize点击打开事物

Fires when user change the page size.


onRefresh点击打开事物

Fires after refresh.


onSelectPage点击打开事物

Fires when user select a new page. callback function contains two parameter:
pageNumber: the new page number
pageSize: the new page size

Code example:

$('#pp').pagination({
	onSelectPage:function(pageNumber, pageSize){
		$(this).pagination('loading');
		alert('pageNumber:'+pageNumber+',pageSize:'+pageSize);
		$(this).pagination('loaded');
	}
});

password(密码框)点击打开事物


radioButton(选项按钮)点击打开事物


span点击打开事物

简单的span标签。


table(表格)点击打开事物


textArea(文本区)点击打开事物


textField(文本框)点击打开事物


yui-ext点击打开事物