public void checkR() { if (English.isChecked()) { lenguaje = "en"; Locale preferredLocale = org.zkoss.util.Locales.getLocale(lenguaje); session.setAttribute(org.zkoss.web.Attributes.PREFERRED_LOCALE, preferredLocale); } else if (Spanish.isChecked()) { lenguaje = "es"; Locale preferredLocale = org.zkoss.util.Locales.getLocale(lenguaje); session.setAttribute(org.zkoss.web.Attributes.PREFERRED_LOCALE, preferredLocale); } }
public void onClick$submit() { JXKH_HYLW meeting = new JXKH_HYLW(); for (int i = 0; i < meetingList.size(); i++) { meeting = meetingList.get(i); meetDeptList = jxkhHylwService.findMeetingDeptByMeetingId(meeting); int index = 0; // int tt = 0; for (int t = 1; t <= meetDeptList.size(); t++) { JXKH_HYLWDept dept = (JXKH_HYLWDept) meetDeptList.get(t - 1); if (user.getDept().getKdName().equals(dept.getName())) { index = dept.getRank(); } } String s = meeting.getTempState(); char[] myStr = s.toCharArray(); if (pass.isChecked()) { myStr[index - 1] = '1'; String s0 = new String(myStr); meeting.setTempState(s0); meeting.setLwState(JXKH_MEETING.First_Dept_Pass); jxkhHylwService.saveOrUpdate(meeting); int k = 1; String str = meeting.getTempState(); for (int j = 0; j < meetDeptList.size(); j++) { if (str.charAt(j) != '1') k = 0; } if (k == 1) meeting.setLwState(JXKH_MEETING.DEPT_PASS); } else if (back.isChecked()) { myStr[index - 1] = '2'; String s0 = new String(myStr); meeting.setTempState(s0); meeting.setLwState(JXKH_MEETING.DEPT_NOT_PASS); } jxkhHylwService.saveOrUpdate(meeting); } try { Messagebox.show("批量审核成功!", "提示", Messagebox.OK, Messagebox.INFORMATION); } catch (Exception e) { e.printStackTrace(); try { Messagebox.show("批量审核失败,请重试!", "提示", Messagebox.OK, Messagebox.INFORMATION); } catch (InterruptedException e1) { e1.printStackTrace(); } } this.onClose(); }
@Override public void afterCompose() { Components.wireVariables(this, this); Components.addForwards(this, this); user = (WkTUser) Sessions.getCurrent().getAttribute("user"); // 获取当前登录用户 pass.setChecked(true); }
/** * Method called when the onUpload event happens. * * @param Media * Media to be imported. */ public void importProject(Media media) { String file = media.getName(); if (checkFileFormat(file)) { if (importCalendars.isChecked()) { try { importCalendar(media.getStreamData(), file); messages.showMessage(Level.INFO, _(file + ": Calendar import successfully!")); } catch (InstanceNotFoundException e) { messages.showMessage(Level.ERROR, _("Instance not found.")); } catch (ValidationException e) { messages.showMessage(Level.ERROR, e.getMessage()); } } else if (importTasks.isChecked()) { importProject(media.getStreamData(), file); messages.showMessage(Level.INFO, _(file + ": Task import successfully!")); } else if (importAll.isChecked()) { try { importAll(media.getStreamData(), file); messages.showMessage(Level.INFO, _(file + ": Import successfully!")); } catch (InstanceNotFoundException e) { messages.showMessage(Level.ERROR, _("Instance not found.")); } catch (ValidationException e) { messages.showMessage(Level.ERROR, e.getMessage()); } } else { messages.showMessage(Level.WARNING, _("Select one of the options.")); } } else { messages.showMessage(Level.ERROR, _("The only current supported formats are mpp and planner.")); } }
private void doStoreInitValues() { oldVar_textboxTIdossPermohonanId = textbox_TIdossPermohonanId.getValue(); oldVar_textboxNamaPemohon = textbox_NamaPemohon.getValue(); oldVar_textboxBagianPemohon = textbox_BagianPemohon.getValue(); oldVar_textboxNamaManager = textbox_NamaManager.getValue(); oldVar_textboxNamaGm = textbox_NamaGm.getValue(); oldVar_textboxNikPemohon = textbox_NikPemohon.getValue(); oldVar_textboxNikManager = textbox_NikManager.getValue(); oldVar_textboxNikGm = textbox_NikGm.getValue(); oldVar_readonly = radio_readonly.getValue(); oldVar_readwrite = radio_readwrite.getValue(); oldVar_aplikasi = radio_aplikasi.getValue(); oldVar_lainlain = radio_lainlain.getValue(); oldVar_textboxLainlain = textbox_Lainlain.getValue(); // oldVar_cepat = cepat.getValue(); oldVar_textbox_DetailPermohonan = textbox_DetailPermohonan.getValue(); }
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); comp.setAttribute(comp.getId() + "Ctrl", this, true); newCustomerRadio.addEventListener( Events.ON_SELECT, new EventListener<Event>() { @Override public void onEvent(Event arg0) throws Exception { newCustomerRadio.setSelected(false); } }); }
private boolean isValidatedFlow() throws InterruptedException { if (textbox_DetailPermohonan.getValue().length() < 1) { Messagebox.show("Silakan isi deskripsi"); return false; } // String role = getUserWorkspace().getUserSession().getEmployeeRole(); if (getUserWorkspace().getUserSession().getEmployeeRole().contains(1532)) { if (listbox_NamaPelaksana.getSelectedItem() == null) { Messagebox.show("Silakan pilih nama pelaksana"); return false; } if (listbox_NamaPelaksana.getSelectedItem().getLabel().equalsIgnoreCase("Silakan pilih")) { Messagebox.show("Silakan pilih nama pelaksana"); return false; } if (intbox_target.getValue() == null) { Messagebox.show("Silakan isikan target selesai"); return false; } } if (radio_readonly.isSelected()) { if (getUploadMedia() == null) { Messagebox.show("Type permohonan Read Only -> silakan lampirkan file"); return false; } } else if (radio_readwrite.isSelected()) { if (getUploadMedia() == null) { Messagebox.show("Type permohonan Read Write -> silakan lampirkan file"); return false; } } else if (radio_aplikasi.isSelected()) { return true; } else if (radio_lainlain.isSelected()) { return true; } return true; }
private void doWriteComponentsToBean(TPermohonan tPermohonan, Mttr mttr) { // tPermohonan.setT_idoss_permohonan_id(textbox_TIdossPermohonanId.getValue()); tPermohonan.setNama_pemohon(textbox_NamaPemohon.getValue()); tPermohonan.setBagian_pemohon(textbox_BagianPemohon.getValue()); Timestamp ts = new Timestamp(java.util.Calendar.getInstance().getTimeInMillis()); tPermohonan.setTgl_permohonan(ts); tPermohonan.setNik_pemohon(textbox_NikPemohon.getValue()); tPermohonan.setNama_manager(textbox_NamaManager.getValue()); tPermohonan.setNik_manager(textbox_NikManager.getValue()); tPermohonan.setNama_gm(textbox_NamaGm.getValue()); tPermohonan.setNik_gm(textbox_NikGm.getValue()); tPermohonan.setDetail_permohonan(textbox_DetailPermohonan.getValue()); if (getUploadMedia() != null) { tPermohonan.setUploadStream(getUploadMedia().getStreamData()); } tPermohonan.setTarget_mulai_digunakan(ts); String lain = textbox_Lainlain.getValue(); tPermohonan.setLain_lain_desc(lain); // radio_lainlain.setValue(lain); Radio type = radiogroupType_permohonan.getSelectedItem(); tPermohonan.setType_permohonan(type.getValue()); tPermohonan.setLain_lain_desc(textbox_Lainlain.getValue()); tPermohonan.setUpdated_divisi(ts); tPermohonan.setUpdated_gm(ts); tPermohonan.setUpdated_manager(ts); tPermohonan.setUpdated_pemohon(ts); Radio dampak = radiogroup_Dampak.getSelectedItem(); tPermohonan.setDampak(dampak.getValue()); Radio prioritas = radiogroup_Prioritas.getSelectedItem(); tPermohonan.setUrgensi(prioritas.getValue()); tPermohonan.setCreated_user(getUserWorkspace().getUserSession().getUserName()); tPermohonan.setUpdated_user(getUserWorkspace().getUserSession().getUserName()); if (intbox_target.getValue() != null) { int target = intbox_target.getValue(); long too = setTarget(target); Timestamp tanggalnya = new Timestamp(too); mttr.setTarget(too); mttr.setTarget2(Integer.toString(target)); } }
public Popup generarPopupResultados( Textbox textboxResultado, boolean readonly, Pexamenes_paraclinicos pexamenes_paraclinicos) { // final Image image = (Image)form.getFellow("img_"+id_alumno); final Textbox tbxRes = textboxResultado; // popup.setId("popupResultados_" + key); Vlayout vlayout = new Vlayout(); if (pexamenes_paraclinicos.getNormal_anormal().equals("S")) { String valor_na = (String) tbxRes.getAttribute("VALOR_NORMAL_ANORMAL"); String valor_descripcion_na = (String) tbxRes.getAttribute("VALOR_DESCRIPCION_NA"); final Radiogroup radiogroup_anormal = new Radiogroup(); Radio radio_normal = new Radio("Normal"); radio_normal.setValue("N"); radiogroup_anormal.appendChild(radio_normal); radiogroup_anormal.appendChild(new Space()); Radio radio_anormal = new Radio("Anormal"); radio_anormal.setValue("A"); radiogroup_anormal.appendChild(radio_anormal); vlayout.appendChild(radiogroup_anormal); final Textbox textbox_anormal = new Textbox(); textbox_anormal.setWidth("400px"); textbox_anormal.setRows(4); textbox_anormal.setVisible(false); if (valor_na != null) { if (valor_na.equals("S")) { radio_normal.setChecked(true); radio_anormal.setChecked(false); textbox_anormal.setVisible(true); } else { radio_anormal.setChecked(true); radio_normal.setChecked(false); textbox_anormal.setVisible(false); } } else { radio_normal.setChecked(true); radio_anormal.setChecked(false); textbox_anormal.setVisible(false); } if (valor_descripcion_na != null) { textbox_anormal.setValue(valor_descripcion_na); } radiogroup_anormal.addEventListener( Events.ON_CHECK, new EventListener<Event>() { @Override public void onEvent(Event arg0) throws Exception { Radio radio_seleccionado = radiogroup_anormal.getSelectedItem(); if (radio_seleccionado != null) { if (radio_seleccionado.getValue().toString().equals("A")) { textbox_anormal.setVisible(true); } else { textbox_anormal.setVisible(false); } tbxRes.setAttribute( "VALOR_NORMAL_ANORMAL", radio_seleccionado.getValue().toString()); } } }); textbox_anormal.addEventListener( Events.ON_CHANGING, new EventListener<Event>() { @Override public void onEvent(Event arg0) throws Exception { InputEvent inputEvent = (InputEvent) arg0; tbxRes.setAttribute("VALOR_DESCRIPCION_NA", inputEvent.getValue()); } }); vlayout.appendChild(textbox_anormal); } final Textbox textbox = new Textbox(); textbox.setWidth("400px"); textbox.setRows(8); vlayout.appendChild(new Label("Resultado paraclinico")); vlayout.appendChild(textbox); textbox.setValue(tbxRes.getValue()); textbox.addEventListener( "onChanging", new EventListener() { @Override public void onEvent(Event event) throws Exception { InputEvent inputevent = (InputEvent) event; tbxRes.setValue(inputevent.getValue()); } }); final Popup popup = new Popup(); popup.addEventListener( Events.ON_OPEN, new EventListener<Event>() { @Override public void onEvent(Event event) throws Exception { textbox.setValue(tbxRes.getValue()); textbox.setFocus(true); } }); popup.appendChild(vlayout); contenedor.appendChild(popup); return popup; }