-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi forum,
i have a problem with databinding for a combobox.
First here is my zul file:
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="./popup_add_contact_person" ?>
<?page title="popup_add_contact_person" contentType="text/html;charset=UTF-8"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk>
<window id="popup_add_contact_person">
<combobox width="132px"
id="familystate" onCreate="familystate.setSelectedIndex(0)"
value="@{popup_add_contact_person.person.familystate}">
<comboitem
label="${c:l('cm.combolist.familystate0')}">
</comboitem>
<comboitem
label="${c:l('cm.combolist.familystate1')}"
value="SINGLE">
</comboitem>
<comboitem
label="${c:l('cm.combolist.familystate2')}"
value="MARRIED">
</comboitem>
<comboitem
label="${c:l('cm.combolist.familystate3')}"
value="SEPARATED">
</comboitem>
<comboitem
label="${c:l('cm.combolist.familystate4')}"
value="DIVORCED">
</comboitem>
<comboitem
label="${c:l('cm.combolist.familystate5')}"
value="WIDOWED">
</comboitem>
<comboitem
label="${c:l('cm.combolist.familystate6')}"
value="ENGAGED">
</comboitem>
<comboitem
label="${c:l('cm.combolist.familystate7')}"
value="COHABITATING">
</comboitem>
</combobox>
</window>
</zk>
The promlem is, that the databinder takes the label="" -values but not the value="" -values from the items, to bind to my person.
Is this a bug? Or have I misunderstood the function?
Greetings
rolo
Hi,rolo
you can refer to here
Asked: 2009-12-08 09:57:15 +0800
Seen: 256 times
Last updated: Dec 08 '09