don't forget to accept the answer as correct if some answer lead you to the solution.
chillworld ( 2015-02-02 13:12:02 +0800 )edit-
FEATURED COMPONENTS
First time here? Check out the FAQ!
i want to make condition :
if(combobox...=="HARIAN TETAP"){
}
how to write these conditions if I choose one of the contents of the combobox? I have made the contents of a combobox with this code
List lst_combo = null;
ViewKaryawan2Manager _vKar = ServiceLocatorViewKaryawan2.getRefrensiManager();
lst_combo = _vKar.getViewByQuery("WHERE v.nama_jenis LIKE '" + "Harian" + "%'AND v.blacklist =" + 0 + "AND v.is_aktif=" + 1 + " GROUP BY nama_jenis");
for (Iterator it = lst_combo.iterator(); it.hasNext();) {
ViewKaryawan2 select2 = (ViewKaryawan2) it.next();
cmb_tipe_karyawan_proses.appendItem(select2.getNama_jenis()).setContext(String.valueOf((select2.getNama_jenis())));
}
cmb_tipe_karyawan_proses.appendItem("semua");
Looking your code i assume you are using MVC so somthing like this should do the trick:
cmb_tipe_karyawan_proses.getSelectedItem()
or
cmb_tipe_karyawan_proses.getSelectedIndex()
Costas
Hello jwasky,
Please refer to the following url:
http://books.zkoss.org/wiki/ZKDeveloper'sReference/MVVM/DataBinding/Collectionand_Selection
Specifically check out the section: Selection in Collection
Best Regards,
Darksu
thanks for help :)
don't forget to accept the answer as correct if some answer lead you to the solution.
chillworld ( 2015-02-02 13:12:02 +0800 )editAsked: 2015-01-30 09:43:19 +0800
Seen: 29 times
Last updated: Feb 02 '15
and what do you want to do with your condition? be more exhaustive
Alecs ( 2015-01-30 10:41:30 +0800 )edit