-
FEATURED COMPONENTS
First time here? Check out the FAQ!
All,
I need each listitem to have a radio button allowing the user to select one, and one only item from the list of items. The following zul snippet appeared to work, can any body let me know if there any problems with this code, or better still let me know if there's a better way of doing this.
<radiogroup>
<listbox id="processesListbox" mold="paging" pageSize="5" model="@{processswin.installedProcesses}">
<listhead sizable="true">
<listheader width="2%"/>
<listheader label="Description" width="99%"/>
</listhead>
<listitem self="@{each=process}">
<listcell>
<radio/>
</listcell>
<listcell label="@{process.name}"/>
</listitem>
</listbox>
</radiogroup>
Regards
Tony
<zk>
<listbox id="box" fixedLayout="true" multiple="false" checkmark="true">
<listhead>
<listheader label="Name"/>
<listheader label="Gender"/>
<listheader label="Age"/>
<listheader label="Description"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="FEMALE"/>
<listcell label="18"/>
<listcell label="A young lady."/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
<listcell label="20"/>
<listcell label="A college student."/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="FEMALE"/>
<listcell label="32"/>
<listcell label="A remarkable artist."/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="MALE"/>
<listcell label="29"/>
<listcell label="A graduate."/>
</listitem>
</listbox>
</zk>
just set multiple attribute to false in ur listbox to have radio button
Asked: 2010-06-30 09:38:15 +0800
Seen: 254 times
Last updated: Jul 01 '10