0

That auto change from checkbox to radio when setModel for list box in zk

asked 2017-05-10 09:05:06 +0800

TanVu123 gravatar image TanVu123
1 1

updated 2017-05-10 09:41:33 +0800

private Listbox createList() {
    ArrayList<PhanCongQuanLyDichVu> listphanCongQLDV = PhanCongQuanLyDichVuDAO.listByColumn2("maNhanVien", user);
    fullDV = db.listAll();
    listDV = new ArrayList<ChiTietDichVuDangKy>();
    listDV1 = new ArrayList<ChiTietDichVuDangKy>();
    ArrayList<XuLyDichVu> listChuaXuLy = XuLyDichVuDAO.listByColumn2("trangThaiXuLy", "0");
    for (int ik = 0; ik < fullDV.size(); ik++) {
        for (int k = 0; k < listChuaXuLy.size(); k++) {
            if (fullDV.get(ik).getMaChiTietDichVuDangKy().equals(listChuaXuLy.get(k).getMaChiTietDichVuXuLy()))
                listDV1.add(fullDV.get(ik));
        }
    }
    for (int i = 0; i < listDV1.size(); i++) {
        for (int j = 0; j < listphanCongQLDV.size(); j++) {
            if (listDV1.get(i).getMaDichVu().equals(listphanCongQLDV.get(j).getMaDichVu())) {
                listDV.add(listDV1.get(i));
            }
        }
    }
    list = ZKT.getListBox(new String[] { "STT", "Mã SV", "Tên DV", "Trạng thái xử lý", "Ngày Đăng ký", "Ghi chú" },
            style, new ListModelList<ChiTietDichVuDangKy>(listDV), new ChiTietDichVuRenderer(), 10,
            new String[] { "50px", "150px", "", "180px", "180px" });
    list.setId("list");
    list.setMultiple(true);
    list.setCheckmark(true);
    list.addEventListener("onClick", this);
    return list;
}

private void updateList() { ArrayList<phancongquanlydichvu> listphanCongQLDV = PhanCongQuanLyDichVuDAO.listByColumn2("maNhanVien", user); fullDV = db.listAll(); listDV = new ArrayList<chitietdichvudangky>(); listDV1 = new ArrayList<chitietdichvudangky>(); ArrayList<xulydichvu> listChuaXuLy = XuLyDichVuDAO.listByColumn2("trangThaiXuLy", "0"); for (int ik = 0; ik < fullDV.size(); ik++) { for (int k = 0; k < listChuaXuLy.size(); k++) { if (fullDV.get(ik).getMaChiTietDichVuDangKy().equals(listChuaXuLy.get(k).getMaChiTietDichVuXuLy())) listDV1.add(fullDV.get(ik)); } } // for (int i = 0; i < listDV1.size(); i++) { for (int j = 0; j < listphanCongQLDV.size(); j++) { if (listDV1.get(i).getMaDichVu().equals(listphanCongQLDV.get(j).getMaDichVu())) { listDV.add(listDV1.get(i)); } } } list.setMultiple(isChildable()); list.setModel(new ListModelList<chitietdichvudangky>(listDV)); if(list.isMultiple()==true){ ZKT.getMessagebox("true"); } }

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2017-05-10 09:05:06 +0800

Seen: 14 times

Last updated: May 10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More