BrightSide Workbench Full Report + Source Code
org.zkoss.zul.Combobox_507 Class Reference

Detailed Description

A combobox.

Non-XUL extension. It is used to replace XUL menulist. This class is more flexible than menulist, such as setAutocomplete setAutodrop.

Default getZclass: z-combobox.(since 3.5.0)

Events: onOpen, onSelect, onAfterRender
Developers can listen to the onOpen event and initializes it when org.zkoss.zk.ui.event.OpenEvent#isOpen is true, and/or clean up if false.
onAfterRender is sent when the model's data has been rendered.(since 5.0.4)

Besides assign a list model, you could assign a renderer (a ComboitemRenderer instance) to a combobox, such that the combobox will use this renderer to render the data returned by ListModel#getElementAt. If not assigned, the default renderer, which assumes a label per combo item, is used. In other words, the default renderer adds a label to a row by calling toString against the object returned by ListModel#getElementAt. (since 3.0.2)

Note: to have better performance, onOpen is sent only if a non-deferrable event listener is registered (see org.zkoss.zk.ui.event.Deferrable).

Like Datebox, the value of a read-only comobobox (isReadonly) can be changed by dropping down the list and selecting an combo item (though users cannot type anything in the input box).

Author
tomyeh
See also
Comboitem

Definition at line 57 of file Combobox_507.java.


The documentation for this class was generated from the following file: