当前位置: 动力学知识库 > 问答 > 编程问答 >

binding - ZK BindComposer value set programitcally not applied while retrieving

问题描述:

I am using zk BindComposer for form binding.I have a combobox to which i set value programitcally . When i retrieve the value its null. How to refreshing programitcally set value while using bindcomposer?

<div apply="org.zkoss.bind.BindComposer"

viewModel="@id('vm') @init('in_raster_hms.formCtrl.patient.PatientViewModel')"form="@id('patient') @load(vm.patient) ">

<combobox id="comboCity" selectedItem="@bind(patient.city)" ></combobox>

Controller :

comboCity.setSelectedIndex(2);

i set selected item programitcally.When i retrieve patient object from binder the value of comboCity is null.I think the combobox selection to be reload.

If i choose from combo manually it works fine.

分享给朋友:
您可能感兴趣的文章:
随机阅读: