⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 paginglistbox.zul

📁 ZK是一个Ajax Java Web框架
💻 ZUL
字号:
<?xml version="1.0" encoding="UTF-8"?><!--pagingListbox.zul{{IS_NOTE	Purpose:			Description:			History:		Mon Nov 17 16:44:29     2008, Created by jumperchen}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window id="demo" apply="org.zkoss.zkdemo.userguide.DemoWindowComposer">	<html><![CDATA[  		<h4>Paging with Listbox</h4>
		<p>Alike Paging controls with Grid, paging are supported by listbox by setting mold="paging".<a href="javascript:;" onclick="if (!zk.isVisible($e('infos'))) {anima.slideDown($e('infos'));} else {anima.slideUp($e('infos'));}">More..</a></p>		<p style="display:none" id="infos">It is better to display a large number of data across multiple pages by specifying the paging mold. You can also specify the paging position to be either top, bottom, or both</p>	]]></html>
	See the <toolbarbutton id="target" label="org.zkoss.zkdemo.userguide.BigList" popup="details"/> implementation.
	<separator/>
	<popup id="details" fulfill="target.onClick" width="450px">
	<div style="border:1px solid #538BA2; background: #FFF; ">
		<html><![CDATA[
<pre style='color:#000000;background:#ffffff;'><span style='color:#7f0055; font-weight:bold; '>public</span> <span style='color:#7f0055; font-weight:bold; '>class</span> BigList <span style='color:#7f0055; font-weight:bold; '>extends</span> java.util.AbstractList {
    <span style='color:#7f0055; font-weight:bold; '>private</span> <span style='color:#7f0055; font-weight:bold; '>int</span> _sz;
    <span style='color:#7f0055; font-weight:bold; '>public</span> BigList(<span style='color:#7f0055; font-weight:bold; '>int</span> sz) {
        <span style='color:#7f0055; font-weight:bold; '>if</span> (sz &lt; 0)
            <span style='color:#7f0055; font-weight:bold; '>throw</span> <span style='color:#7f0055; font-weight:bold; '>new</span> <span style='color:#7f0055; font-weight:bold; '>IllegalArgumentException</span>(
                <span style='color:#2a00ff; '>"Negative not allowed: "</span>+sz);
        _sz = sz;
    }
    <span style='color:#7f0055; font-weight:bold; '>public</span> <span style='color:#7f0055; font-weight:bold; '>int</span> size() {
        <span style='color:#7f0055; font-weight:bold; '>return</span> _sz;
    }
    <span style='color:#7f0055; font-weight:bold; '>public</span> <span style='color:#7f0055; font-weight:bold; '>Object</span> get(<span style='color:#7f0055; font-weight:bold; '>int</span> j) {
        <span style='color:#7f0055; font-weight:bold; '>return</span> <span style='color:#7f0055; font-weight:bold; '>new</span> <span style='color:#7f0055; font-weight:bold; '>Integer</span>(j);
    }
}
</pre>
		]]></html>
		</div>
	</popup>	
	<separator/>	<tabbox width="100%" tabscroll="false">		<tabs>			<tab id="demoView" label="Demo"/>			<tab id="srcView" label="View Source"/>		</tabs>		<tabpanels>			<tabpanel>				<window id="view">				</window>			</tabpanel>						<tabpanel>				<panel>					<panelchildren>						<textbox id="codeView" class="code" rows="20" width="95%">			<attribute name="value"><![CDATA[<zk>
	Paging can be supported to locate at three position: Top, Bottom, and Both.
	<radiogroup
		onCheck="tree.pagingPosition = self.selectedItem.label;listbox.pagingPosition = self.selectedItem.label">
		<radio label="top" />
		<radio label="bottom" checked="true" />
		<radio label="both" />
	</radiogroup>
	<separator/>
	<button label="Change Paging Mold">
		<attribute name="onClick">
		listbox.pagingChild.mold = "os".equals(listbox.pagingChild.mold) ? "default" : "os";
		</attribute>
	</button>
	<zscript>
		List items = new org.zkoss.zkdemo.userguide.BigList(1000); //a big list of Integer
	</zscript>
	<listbox id="listbox" mold="paging">
		<listitem forEach="&#36;{items}">
		<listcell label="&#36;{each}-1"/>
		<listcell label="&#36;{each}-2"/>
		<listcell label="&#36;{each}-3"/>
		<listcell label="&#36;{each}-4"/>
		</listitem>
	</listbox>
</zk>			]]></attribute>						</textbox>					</panelchildren>					<toolbar mold="panel">
						<button id="tryBtn" label="Try me!"/>						<button id="reloadBtn" label="Reload" height="18px"/>					</toolbar>				</panel>			</tabpanel>		</tabpanels>	</tabbox></window>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -