Listbox"

From Documentation
Line 56: Line 56:
 
|-
 
|-
 
| <center><tt>onPaging</tt></center>
 
| <center><tt>onPaging</tt></center>
| [#PagingEvent org.zkoss.zul.event.PagingEvent]
+
| <javadoc>org.zkoss.zul.event.PagingEvent</javadoc>
  
 
<tt>'''Description:''' Notifies one of the pages of a multi-page component is</tt>
 
<tt>'''Description:''' Notifies one of the pages of a multi-page component is</tt>
Line 64: Line 64:
 
|-
 
|-
 
| <center><tt>onSelect</tt></center>
 
| <center><tt>onSelect</tt></center>
| [#PagingEvent org.zkoss.zul.event.SelectEvent]
+
| <javadoc>org.zkoss.zul.event.SelectEvent</javadoc>
  
 
<tt>'''Description:''' Notifies one that the user has selected a new item in the list box</tt>
 
<tt>'''Description:''' Notifies one that the user has selected a new item in the list box</tt>

Revision as of 08:27, 12 May 2010

Listbox

Employment/Purpose

Components: listbox, listitem, listcell, listhead and listheader.

A list box is used to display a number of items in a list. The user may select an item from the list.

Example

ZKComRef Listbox Example.png


 <window title="listbox demo" border="normal">
         <listbox id="box" width="250px">
             <listhead sizable="true">
                 <listheader label="name" sort="auto"/>
                 <listheader label="gender" sort="auto"/>
             </listhead>
             <listitem>
                 <listcell label="Mary"/>
                 <listcell label="FEMALE"/>
             </listitem>
             <listitem>
                 <listcell label="John"/>
                 <listcell label="MALE"/>
             </listitem>
             <listitem>
                 <listcell label="Jane"/>
                 <listcell label="FEMALE"/>
             </listitem>
             <listitem>
                 <listcell label="Henry"/>
                 <listcell label="MALE"/>
             </listitem>
             <listfoot >
                 <listfooter><label value="This is footer1"/></listfooter>
                 <listfooter><label value="This is footer2"/></listfooter>
             </listfoot>
         </listbox>        
 </window>

Listbox has two molds: default and select. If the select mold is used, the HTML's SELECT tag is generated instead.

Supported events

Name
Event Type
onPaging
PagingEvent

Description: Notifies one of the pages of a multi-page component is

selected by the user.

onSelect
SelectEvent

Description: Notifies one that the user has selected a new item in the list box


Supported Children

Listitem, Listhead, Listfoot

Use cases

Version Description Example Location
5.0+    

Version History

Version Date Content
5.x.x x/x/20xx Initialization



Last Update : 2010/05/12

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.