Listitem

A list item.

<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>

Class Name

org.zkoss.zul.Listitem

Supported Child Components

Listcell

Supported Events

Name

Event Type

onSelect

org.zkoss.zul.event.SelectEvent

Description: Represents an event cause by user's the list selection is changed at the client.

Properties

Name

Description

Data Type

Default Value

maxlength

the maximal length of this item's label.

int

index

the index of this item (aka., the order in the listbox).

int

value

The value this cell stored.

java.lang.Object

label

the width which the same as getListheader()'s width.

String

src

the src of the Listcell it contains, or null if no such cell.

String

image

Returns the image of the Listcell it contains.

String

disable

Is this Listitem is disabled.

boolean

false

sel ected

Is this Listitem is selected.

boolean

false

Methods

Name

Description

Return Data Type

getListbox()

Returns the listbox that contains this column.

org.zkoss.zul.Listbox

getOuterAttrs()

java.lang.String

setParent(org.zkoss.zk.ui.Component parent)

Can only be Listbox

void

Invalidate()

Inherited From