Esempio n. 1
0
 public void loadDosenOnChanging(String nama) throws Exception {
   try {
     DosenDAO dao = new DosenDAOImpl();
     List<Dosen> dosens =
         dao.getsByName(nama, (ProgramStudi) cmbProgdi.getSelectedItem().getValue());
     cmbNamaDosen.getItems().clear();
     for (Dosen d : dosens) {
       Comboitem items = new Comboitem();
       items.setValue(d);
       items.setLabel(d.getNama());
       cmbNamaDosen.appendChild(items);
     }
   } catch (Exception ex) {
     Messagebox.show(ex.getMessage());
   }
 }
Esempio n. 2
0
 public void loadDosen() throws Exception {
   try {
     cmbNamaDosen.setValue("");
     DosenDAO dao = new DosenDAOImpl();
     List<Dosen> dosens = dao.getsByProdi((ProgramStudi) cmbProgdi.getSelectedItem().getValue());
     cmbNamaDosen.getItems().clear();
     for (Dosen d : dosens) {
       Comboitem items = new Comboitem();
       items.setValue(d);
       items.setLabel(d.getNama());
       cmbNamaDosen.appendChild(items);
     }
   } catch (Exception ex) {
     ex.printStackTrace();
     Messagebox.show(ex.getMessage());
   }
 }