private void doSimpan() throws InterruptedException { TPermohonan tPermohonan = gettPermohonan(); Mttr mttr = new Mttr(); doWriteComponentsToBean(tPermohonan, mttr); try { String uploadeFileName = null; if (getUploadMedia() != null) { uploadeFileName = getUploadMedia().getName(); } getPermohonanService() .simpanAllTPermohonan( uploadeFileName, tPermohonan, mttr, getUserWorkspace().getUserSession().getEmployeeRole()); TVerifikasi tVerifikasi = getPermohonanService() .getTVerifikasiByTIdossVerifikasiId(gettPermohonan().getT_idoss_permohonan_id()); doWriteComponentsToBeanVer(tVerifikasi); getVerifikasiService().saveOrUpdateTVerifikasi(tVerifikasi); } catch (DataAccessException e) { String message = e.getMessage(); String title = Labels.getLabel("message_Error"); MultiLineMessageBox.doSetTemplate(); MultiLineMessageBox.show(message, title, MultiLineMessageBox.OK, "ERROR", true); } ListModelList lml = (ListModelList) listbox_DaftarPermohonan.getListModel(); // Check if the object is new or updated // -1 means that the obj is not in the list, so it's new. if (lml.indexOf(tPermohonan) == -1) { lml.add(tPermohonan); } else { lml.set(lml.indexOf(tPermohonan), tPermohonan); } lml.sort(new TPermohonanComparator(), true); }