@Listen("onSeleccion = #divCatalogoInforme") public void seleccion() { Informe informe = catalogo.objetoSeleccionadoDelCatalogo(); ltbAcciones.getItems().clear(); List<PlanAccion> planes = servicioPlanAccion.buscarPorInformeyTipo(informe, "normal"); if (!planes.isEmpty()) { ltbAcciones.setModel(new ListModelList<PlanAccion>(planes)); ltbAcciones.setCheckmark(false); ltbAcciones.setMultiple(false); ltbAcciones.setCheckmark(true); ltbAcciones.setMultiple(true); ltbAcciones.renderAll(); if (ltbAcciones.getItemCount() != 0) { for (int i = 0; i < ltbAcciones.getItemCount(); i++) { Listitem listItem = ltbAcciones.getItemAtIndex(i); PlanAccion plan = listItem.getValue(); if (plan.getEstado().equals("Finalizado")) listItem.setSelected(true); else listItem.setSelected(false); } } } ltbAccionesInspector.getItems().clear(); List<PlanAccion> planes2 = servicioPlanAccion.buscarPorInformeyTipo(informe, "inspector"); if (!planes.isEmpty()) { ltbAccionesInspector.setModel(new ListModelList<PlanAccion>(planes2)); ltbAccionesInspector.setCheckmark(false); ltbAccionesInspector.setMultiple(false); ltbAccionesInspector.setCheckmark(true); ltbAccionesInspector.setMultiple(true); ltbAccionesInspector.renderAll(); if (ltbAccionesInspector.getItemCount() != 0) { for (int i = 0; i < ltbAccionesInspector.getItemCount(); i++) { Listitem listItem = ltbAccionesInspector.getItemAtIndex(i); PlanAccion plan = listItem.getValue(); if (plan.getEstado().equals("Finalizado")) listItem.setSelected(true); else listItem.setSelected(false); } } } lblOrdenamientos.setValue(informe.getOrdenamientos()); lblFuncionario.setValue(informe.getFuncionario()); if (informe.getFechaVisita() != null) lblFechaVisita.setValue(formatoFecha.format(informe.getFechaVisita())); lblCodigo.setValue(informe.getCodigo()); lblCedula.setValue(informe.getPacienteA().getCedula()); lblFicha.setValue(informe.getPacienteA().getFicha()); lblNombre.setValue( informe.getPacienteA().getPrimerNombre() + " " + informe.getPacienteA().getPrimerApellido()); lblDescripcion.setValue(informe.getFgad()); lblTipo.setValue(informe.getFga()); dtbFecha.setValue(informe.getFa()); codigoInforme = informe.getIdInforme(); catalogo.setParent(null); }
public void doListDataChange(ListDataEvent event) { // when this is called _model is never null final ListModel _model = _listbox.getModel(); final int newsz = _model.getSize(), oldsz = _listbox.getItemCount(); int min = event.getIndex0(), max = event.getIndex1(), cnt; switch (event.getType()) { case ListDataEvent.INTERVAL_ADDED: cnt = newsz - oldsz; if (cnt <= 0) throw new UiException("Adding causes a smaller list?"); if ((oldsz <= 0 || cnt > INVALIDATE_THRESHOLD) && !inPagingMold()) _listbox.invalidate(); // Bug 3147518: avoid memory leak // Also better performance (outer better than remove a lot) if (min < 0) if (max < 0) min = 0; else min = max - cnt + 1; if (min > oldsz) min = oldsz; ListitemRenderer renderer = null; final Component next = min < oldsz ? _listbox.getItemAtIndex(min) : null; while (--cnt >= 0) { if (renderer == null) renderer = (ListitemRenderer) getRealRenderer(); _listbox.insertBefore(newUnloadedItem(renderer, min++), next); } break; case ListDataEvent.INTERVAL_REMOVED: cnt = oldsz - newsz; if (cnt <= 0) throw new UiException("Removal causes a larger list?"); if (min >= 0) max = min + cnt - 1; else if (max < 0) max = cnt - 1; // 0 ~ cnt - 1 if (max > oldsz - 1) max = oldsz - 1; if ((newsz <= 0 || cnt > INVALIDATE_THRESHOLD) && !inPagingMold()) _listbox.invalidate(); // Bug 3147518: avoid memory leak // Also better performance (outer better than remove a lot) // detach from end (due to groopfoot issue) Component comp = _listbox.getItemAtIndex(max); while (--cnt >= 0) { Component p = comp.getPreviousSibling(); comp.detach(); comp = p; } break; default: // CONTENTS_CHANGED syncModel(min, max); } }
protected boolean validarLista2() { boolean noVacio = true; for (int i = 0; i < ltbAccionesInspector.getItemCount(); i++) { Listitem listItem = ltbAccionesInspector.getItemAtIndex(i); if (listItem.isSelected()) { Datebox date = (Datebox) listItem.getChildren().get(5).getChildren().get(0); Date fecha = date.getValue(); if (fecha == null) noVacio = false; } } return noVacio; }
public void onClick$deleteBtn(Event event) { Window canvasBoardWindow = (Window) zkpaintWindow.getFellow("canvasInc").getFellow("canvasBoardWindow"); Canvas cvs1 = (Canvas) canvasBoardWindow.getFellow("cvs1"); int size = shapeListBox.getItemCount(); System.out.println(size); for (int i = size - 1; i > -1; i--) { if (!shapeListBox.getItemAtIndex(i).isSelected()) continue; System.out.println(i); cvs1.remove(i); ((ListModelList) shapeListBox.getModel()).remove(i); } }
public void initWindow() { List deptlist = departmentService.findDeptByKdidAndType(0L, "1"); deptList.setModel(new ListModelList(deptlist)); deptList.setItemRenderer( new ListitemRenderer() { public void render(Listitem arg0, Object arg1) throws Exception { WkTDept dept = (WkTDept) arg1; arg0.setLabel(dept.getKdName()); arg0.setValue(dept.getKdId()); } }); deptList.getItemAtIndex(0).setSelected(true); WkTDept department = (WkTDept) deptlist.get(0); KdId = department.getKdId(); List rolelist = roleService.findByKdidAndKrname(KdId, "ѧÉú"); if (rolelist.size() != 0) { WkTRole role = (WkTRole) rolelist.get(0); Role = role.getKrId(); } search.setDisabled(true); loadTree(); initPanel(); WkTDept dept = (WkTDept) userService.get(WkTDept.class, KdId); yuan.setLabel(dept.getGradeName(WkTDept.GRADE_YUAN)); xi.setLabel(dept.getGradeName(WkTDept.GRADE_XI)); leaderlist.setItemRenderer( new ListitemRenderer() { public void render(Listitem item, Object data) throws Exception { final Student stu = (Student) data; Listcell c1 = new Listcell(item.getIndex() + 1 + ""); Listcell c2 = new Listcell(stu.getStId()); Listcell c3 = new Listcell(stu.getUser().getKuName()); Listcell c4 = new Listcell(stu.getStClass()); Listcell c5 = new Listcell(stu.getUser().getXiDept()); Listcell c6 = new Listcell(stu.getUser().getYuDept()); Listcell c7 = new Listcell(stu.getUser().getKuPasswd()); item.appendChild(c1); item.appendChild(c2); item.appendChild(c3); item.appendChild(c4); item.appendChild(c5); item.appendChild(c6); item.appendChild(c7); } }); }
// 下载上传的文件 public void onClick$down() throws InterruptedException, FileNotFoundException { if (modelListbox.getSize() == 0) return; Listitem it = upList.getSelectedItem(); if (it == null) { if (modelListbox.getSize() > 0) { it = upList.getItemAtIndex(0); } } if (it.getValue() instanceof Media) { Filedownload.save((Media) it.getValue()); } else { WkTFile f = (WkTFile) it.getValue(); String path = Executions.getCurrent().getDesktop().getWebApp().getRealPath("/upload/"); Filedownload.save( new File(path + "\\" + f.getId().getKiId() + "\\" + f.getId().getKfName()), null); } }
public void render(int x, int y) { Listbox listbox = target.as(Listbox.class); if (x == -1) x = 0; if (y == -1) y = listbox.getItemCount() - 1; ArrayList<String> ids = new ArrayList<String>(); while (true) { if (x > y) break; Listitem item = listbox.getItemAtIndex(x++); if (item != null && !item.isLoaded()) { ids.add(item.getUuid()); } } if (ids.size() == 0) return; String desktopId = target.getDesktop().getId(); String cmd = Events.ON_RENDER; Map<String, Object> data = EventDataManager.getInstance().build(new RenderEvent(cmd, new HashSet<String>(ids))); ((ClientCtrl) target.getClient()).postUpdate(desktopId, target.getUuid(), cmd, data, false); ((ClientCtrl) getClient()).flush(desktopId); };
@SuppressWarnings("deprecation") public static void showSalaryHeadWindow(Event event, GenericValue gv) throws SuspendNotAllowedException, InterruptedException, GenericEntityException { Component approveClaimWindow = event.getTarget(); GenericValue userLogin = (GenericValue) Executions.getCurrent().getDesktop().getSession().getAttribute("userLogin"); GenericValue person = (GenericValue) Executions.getCurrent().getDesktop().getSession().getAttribute("person"); String salaryHeadId = gv.getString("salaryHeadId"); String hrName = gv.getString("hrName"); String isCr = gv.getString("isCr"); String salaryHeadTypeId = gv.getString("salaryHeadTypeId"); String geoId = gv.getString("geoId"); String isTaxable = gv.getString("isTaxable"); String isMandatory = gv.getString("isMandatory"); String currencyUomId = gv.getString("currencyUomId"); String salaryComputationTypeId = gv.getString("salaryComputationTypeId"); Window win = (Window) Executions.createComponents( "/zul/payRollManagement/updateSalaryHead.zul", null, UtilMisc.toMap("oldHrName", hrName)); win.setTitle("Update Salary Head"); GenericDelegator delegator = HrmsInfrastructure.getDelegator(); // GenericDelegator.getGenericDelegator("default"); /* * EntityCondition condition = EntityCondition.makeCondition("enumTypeId", * EntityOperator.EQUALS, "CLAIM_TYPE"); */ EntityCondition currencyCondition = EntityCondition.makeCondition("uomTypeId", EntityOperator.EQUALS, "CURRENCY_MEASURE"); Set<String> SalaryHeadTypeToDisplay = new HashSet(); Set<String> currencyTypeToDisplay = new HashSet(); Set<String> SalaryComputationTypeToDisplay = new HashSet(); SalaryHeadTypeToDisplay.add("salaryHeadTypeId"); SalaryHeadTypeToDisplay.add("description"); currencyTypeToDisplay.add("uomId"); currencyTypeToDisplay.add("description"); SalaryComputationTypeToDisplay.add("salaryComputationTypeId"); SalaryComputationTypeToDisplay.add("description"); // =====================SalaryHeadType============================== List<GenericValue> salaryHeadType = delegator.findList("SalaryHeadType", null, SalaryHeadTypeToDisplay, null, null, false); salaryHeadType.add(0, null); SimpleListModel salaryHeadTypeList = new SimpleListModel(salaryHeadType); Listbox applySalaryHeadTypeListBox = (Listbox) win.getFellow("applySalaryHeadType"); applySalaryHeadTypeListBox.setModel(salaryHeadTypeList); applySalaryHeadTypeListBox.setItemRenderer(new SalaryHeadTypeRenderer()); for (int i = 1; i < salaryHeadType.size(); i++) { GenericValue IndividualsalaryHeadType = salaryHeadType.get(i); String itemValue = IndividualsalaryHeadType.getString("salaryHeadTypeId"); if (itemValue.equals(salaryHeadTypeId)) { applySalaryHeadTypeListBox.setSelectedIndex(i); break; } } // =====================UOM===CURRENCY============================== List<GenericValue> currency = delegator.findList("Uom", currencyCondition, currencyTypeToDisplay, null, null, false); currency.add(0, null); SimpleListModel currencyList = new SimpleListModel(currency); Listbox currencyListBox = (Listbox) win.getFellow("applyCurrencyUomId"); currencyListBox.setModel(currencyList); currencyListBox.setItemRenderer(new CurrencyRenderer()); for (int i = 1; i < currency.size(); i++) { GenericValue IndividualCurrency = currency.get(i); String itemValue = IndividualCurrency.getString("uomId"); if (itemValue.equals(currencyUomId)) { currencyListBox.setSelectedIndex(i); break; } } // =====================SalaryComputationType============================== List<GenericValue> SalaryComputationType = delegator.findList( "SalaryComputationType", null, SalaryComputationTypeToDisplay, null, null, false); SalaryComputationType.add(0, null); SimpleListModel SalaryComputationTypeList = new SimpleListModel(SalaryComputationType); Listbox SalaryComputationTypeListBox = (Listbox) win.getFellow("applyComputationType"); SalaryComputationTypeListBox.setModel(SalaryComputationTypeList); SalaryComputationTypeListBox.setItemRenderer(new SalaryComputationTypeRenderer()); for (int i = 1; i < SalaryComputationType.size(); i++) { GenericValue IndividualSalaryComputationType = SalaryComputationType.get(i); String itemValue = IndividualSalaryComputationType.getString("salaryComputationTypeId"); if (itemValue.equals(salaryComputationTypeId)) { SalaryComputationTypeListBox.setSelectedIndex(i); break; } } // ======================================================================== // salaryHeadName Label salaryHeadNameLabel = (Label) win.getFellow("salaryHeadName"); salaryHeadNameLabel.setValue(salaryHeadId); Textbox salaryHeadIdTextbox = (Textbox) win.getFellow("salaryHeadId"); salaryHeadIdTextbox.setValue(salaryHeadId); Textbox hrNameTextbox = (Textbox) win.getFellow("applyHrName"); hrNameTextbox.setValue(hrName); String Credit = ""; if (isCr.equals("Y")) Credit = "YES"; else Credit = "NO"; Listbox CreditListbox = (Listbox) win.getFellow("applyCredit"); Listitem CreditListItem = new Listitem(); for (int i = 1; i <= 2; i++) { CreditListItem = CreditListbox.getItemAtIndex(i); String itemValue = (String) CreditListItem.getValue(); if (itemValue.equals(isCr)) { CreditListbox.setSelectedIndex(i); break; } } /* * Bandbox geoIdBandbox = (Bandbox) win.getFellow("searchPanel"); * geoIdBandbox.setValue(geoId); */ CountryBox geoIdBandbox = (CountryBox) win.getFellow("countrybandbox"); geoIdBandbox.setValue(geoId); String Taxable = ""; if (isTaxable.equals("Y")) Taxable = "YES"; else Taxable = "NO"; Listbox isTaxableListbox = (Listbox) win.getFellow("applyTaxable"); Listitem isTaxableListItem = new Listitem(); for (int i = 1; i <= 2; i++) { isTaxableListItem = isTaxableListbox.getItemAtIndex(i); String itemValue = (String) isTaxableListItem.getValue(); if (itemValue.equals(isTaxable)) { isTaxableListbox.setSelectedIndex(i); break; } } String Mandatory = ""; if (isMandatory.equals("Y")) Mandatory = "YES"; else Mandatory = "NO"; Listbox isMandatoryListbox = (Listbox) win.getFellow("applyMandatory"); Listitem isMandatoryListItem = new Listitem(); for (int i = 1; i <= 2; i++) { isMandatoryListItem = isMandatoryListbox.getItemAtIndex(i); String itemValue = (String) isMandatoryListItem.getValue(); if (itemValue.equals(isMandatory)) { isMandatoryListbox.setSelectedIndex(i); break; } } // approveClaimWindow.detach(); win.doModal(); }
private void syncModel0(int offset, int limit) { int min = offset; int max = offset + limit - 1; final ListModel _model = _listbox.getModel(); final int newsz = _model.getSize(); final int oldsz = _listbox.getItemCount(); final Paginal _pgi = _listbox.getPaginal(); final boolean inPaging = inPagingMold(); final boolean shallInvalidated = // Bug 3147518: avoid memory leak (min < 0 || min == 0) && (max < 0 || max >= newsz || max >= oldsz); int newcnt = newsz - oldsz; int atg = _pgi != null ? _listbox.getActivePage() : 0; ListitemRenderer renderer = null; Component next = null; if (oldsz > 0) { if (min < 0) min = 0; else if (min > oldsz - 1) min = oldsz - 1; if (max < 0) max = oldsz - 1; else if (max > oldsz - 1) max = oldsz - 1; if (min > max) { int t = min; min = max; max = t; } int cnt = max - min + 1; // # of affected if (_model instanceof GroupsListModel) { // detach all from end to front since groupfoot // must be detached before group newcnt += cnt; // add affected later if ((shallInvalidated || newcnt > INVALIDATE_THRESHOLD) && !inPaging) _listbox.invalidate(); // Bug 3147518: avoid memory leak // Also better performance (outer better than remove a lot) Component comp = _listbox.getItemAtIndex(max); next = comp.getNextSibling(); while (--cnt >= 0) { Component p = comp.getPreviousSibling(); comp.detach(); comp = p; } } else { // ListModel int addcnt = 0; Component item = _listbox.getItemAtIndex(min); while (--cnt >= 0) { next = item.getNextSibling(); if (cnt < -newcnt) { // if shrink, -newcnt > 0 item.detach(); // remove extra } else if (((Listitem) item).isLoaded()) { if (renderer == null) renderer = (ListitemRenderer) getRealRenderer(); item.detach(); // always detach _listbox.insertBefore(newUnloadedItem(renderer, min), next); ++addcnt; } ++min; item = next; // B2100338.,next item could be Paging, don't use Listitem directly } if ((shallInvalidated || addcnt > INVALIDATE_THRESHOLD || addcnt + newcnt > INVALIDATE_THRESHOLD) && !inPagingMold()) _listbox.invalidate(); // Bug 3147518: avoid memory leak // Also better performance (outer better than remove a lot) } } else { min = 0; } for (; --newcnt >= 0; ++min) { if (renderer == null) renderer = (ListitemRenderer) getRealRenderer(); _listbox.insertBefore(newUnloadedItem(renderer, min), next); } if (_pgi != null) { if (atg >= _pgi.getPageCount()) atg = _pgi.getPageCount() - 1; _pgi.setActivePage(atg); } }
// Metodo para colocar los datos del objeto que se consulta en la vista // public void mostrarDatos(Ficha_epidemiologia_n22 obj) throws Exception { Ficha_epidemiologia_n22 ficha_epidemiologia_n22 = (Ficha_epidemiologia_n22) obj; try { tbxCodigo_ficha.setValue(ficha_epidemiologia_n22.getCodigo_ficha()); tbxCodigo_diagnostico.setValue(ficha_epidemiologia_n22.getCodigo_diagnostico()); dtbxFecha_inicial.setValue(ficha_epidemiologia_n22.getFecha_inicial()); tbxIdentificacion.setValue(ficha_epidemiologia_n22.getIdentificacion()); obtenerAdmision(admision); FormularioUtil.deshabilitarComponentes(groupboxEditar, true, new String[] {}); Utilidades.seleccionarRadio( rdbHaemophilus_infliuencae_b, ficha_epidemiologia_n22.getHaemophilus_infliuencae_b()); tbxDosis.setValue(ficha_epidemiologia_n22.getDosis()); dtbxFecha_ultima_dosis.setValue(ficha_epidemiologia_n22.getFecha_ultima_dosis()); Utilidades.seleccionarRadio( rdbPresento_carne_vacuna, ficha_epidemiologia_n22.getPresento_carne_vacuna()); Utilidades.seleccionarRadio( rdbStreptococcus_pneumoniae, ficha_epidemiologia_n22.getStreptococcus_pneumoniae()); tbxDosis2.setValue(ficha_epidemiologia_n22.getDosis2()); dtbxFecha_ultima_dosis2.setValue(ficha_epidemiologia_n22.getFecha_ultima_dosis2()); Utilidades.seleccionarRadio( rdbPresento_carne_vacuna2, ficha_epidemiologia_n22.getPresento_carne_vacuna2()); Utilidades.seleccionarRadio( rdbInfluenza_estacional, ficha_epidemiologia_n22.getInfluenza_estacional()); tbxDosis3.setValue(ficha_epidemiologia_n22.getDosis3()); dtbxFecha_ultima_dosis3.setValue(ficha_epidemiologia_n22.getFecha_ultima_dosis3()); Utilidades.seleccionarRadio( rdbPresento_carne_vacuna3, ficha_epidemiologia_n22.getPresento_carne_vacuna3()); Utilidades.seleccionarRadio( rdbFuente_de_notificacion, ficha_epidemiologia_n22.getFuente_de_notificacion()); Utilidades.seleccionarRadio( rdbViajo_durante_14dias, ficha_epidemiologia_n22.getViajo_durante_14dias()); for (int i = 0; i < lbxDpto_procedencia.getItemCount(); i++) { Listitem listitem = lbxDpto_procedencia.getItemAtIndex(i); if (listitem.getValue().toString().equals(ficha_epidemiologia_n22.getDpto_procedencia())) { listitem.setSelected(true); i = lbxDpto_procedencia.getItemCount(); } } for (int i = 0; i < lbxMunicipio_procedencia.getItemCount(); i++) { Listitem listitem = lbxMunicipio_procedencia.getItemAtIndex(i); if (listitem .getValue() .toString() .equals(ficha_epidemiologia_n22.getMunicipio_procedencia())) { listitem.setSelected(true); i = lbxMunicipio_procedencia.getItemCount(); } } tbxProcedencia_internacional.setValue(ficha_epidemiologia_n22.getProcedencia_internacional()); Utilidades.seleccionarRadio( rdbContacto_con_aves, ficha_epidemiologia_n22.getContacto_con_aves()); Utilidades.seleccionarRadio( rdbContacto_estrecho, ficha_epidemiologia_n22.getContacto_estrecho()); chbAsma.setChecked(ficha_epidemiologia_n22.getAsma()); chbEpoc.setChecked(ficha_epidemiologia_n22.getEpoc()); chbDiabetes.setChecked(ficha_epidemiologia_n22.getDiabetes()); chbVih_otras_inmu.setChecked(ficha_epidemiologia_n22.getVih_otras_inmu()); chbEnfermedad_cardiaca.setChecked(ficha_epidemiologia_n22.getEnfermedad_cardiaca()); chbCancer.setChecked(ficha_epidemiologia_n22.getCancer()); chbMalnutricion.setChecked(ficha_epidemiologia_n22.getMalnutricion()); chbEmbarazo.setChecked(ficha_epidemiologia_n22.getEmbarazo()); tbxSemana_de_gestacion.setValue(ficha_epidemiologia_n22.getSemana_de_gestacion()); chbObesidad.setChecked(ficha_epidemiologia_n22.getObesidad()); chbInsuficiencia_renal.setChecked(ficha_epidemiologia_n22.getInsuficiencia_renal()); chbToma_medicamentos.setChecked(ficha_epidemiologia_n22.getToma_medicamentos()); chbFumador.setChecked(ficha_epidemiologia_n22.getFumador()); chbOtros.setChecked(ficha_epidemiologia_n22.getOtros()); tbxCual.setValue(ficha_epidemiologia_n22.getCual()); Utilidades.seleccionarRadio(rdbTos, ficha_epidemiologia_n22.getTos()); Utilidades.seleccionarRadio(rdbPostracion, ficha_epidemiologia_n22.getPostracion()); Utilidades.seleccionarRadio(rdbFiebre, ficha_epidemiologia_n22.getFiebre()); Utilidades.seleccionarRadio(rdbTiraje_toraxico, ficha_epidemiologia_n22.getTiraje_toraxico()); Utilidades.seleccionarRadio(rdbDolor_garganta, ficha_epidemiologia_n22.getDolor_garganta()); Utilidades.seleccionarRadio(rdbDolor_muscular, ficha_epidemiologia_n22.getDolor_muscular()); Utilidades.seleccionarRadio(rdbRinorrea, ficha_epidemiologia_n22.getRinorrea()); Utilidades.seleccionarRadio( rdbNo_tolera_via_oral, ficha_epidemiologia_n22.getNo_tolera_via_oral()); Utilidades.seleccionarRadio(rdbConjuntivitis, ficha_epidemiologia_n22.getConjuntivitis()); Utilidades.seleccionarRadio(rdbDiarrea, ficha_epidemiologia_n22.getDiarrea()); Utilidades.seleccionarRadio(rdbCefalea, ficha_epidemiologia_n22.getCefalea()); Utilidades.seleccionarRadio(rdbDolor_abdominal, ficha_epidemiologia_n22.getDolor_abdominal()); Utilidades.seleccionarRadio( rdbDifucultad_respirat, ficha_epidemiologia_n22.getDifucultad_respirat()); Utilidades.seleccionarRadio(rdbOtro, ficha_epidemiologia_n22.getOtro()); tbxCual_otro.setValue(ficha_epidemiologia_n22.getCual_otro()); Utilidades.seleccionarRadio( rdbSe_tomo_radiografia, ficha_epidemiologia_n22.getSe_tomo_radiografia()); dtbxFecha_de_toma.setValue(ficha_epidemiologia_n22.getFecha_de_toma()); Utilidades.seleccionarRadio( rdbHallazgo_radiografia, ficha_epidemiologia_n22.getHallazgo_radiografia()); Utilidades.seleccionarRadio(rdbUso_antibiotico, ficha_epidemiologia_n22.getUso_antibiotico()); dtbxFecha_inicio_antibioticos.setValue( ficha_epidemiologia_n22.getFecha_inicio_antibioticos()); Utilidades.seleccionarRadio(rdbUso_antiviral, ficha_epidemiologia_n22.getUso_antiviral()); dtbxFecha_inicio_antiviral.setValue(ficha_epidemiologia_n22.getFecha_inicio_antiviral()); Utilidades.seleccionarRadio( rdbHubo_complicaciones, ficha_epidemiologia_n22.getHubo_complicaciones()); Utilidades.seleccionarRadio( rdbCuales_complicaciones, ficha_epidemiologia_n22.getCuales_complicaciones()); tbxCuales3.setValue(ficha_epidemiologia_n22.getCuales3()); Utilidades.seleccionarRadio( rdbServicio_hopitalizo, ficha_epidemiologia_n22.getServicio_hopitalizo()); for (int i = 0; i < lbxDiganostico_inicial.getItemCount(); i++) { Listitem listitem = lbxDiganostico_inicial.getItemAtIndex(i); if (listitem .getValue() .toString() .equals(ficha_epidemiologia_n22.getDiganostico_inicial())) { listitem.setSelected(true); i = lbxDiganostico_inicial.getItemCount(); } } for (int i = 0; i < lbxDiagnostico_al_egreso.getItemCount(); i++) { Listitem listitem = lbxDiagnostico_al_egreso.getItemAtIndex(i); if (listitem .getValue() .toString() .equals(ficha_epidemiologia_n22.getDiagnostico_al_egreso())) { listitem.setSelected(true); i = lbxDiagnostico_al_egreso.getItemCount(); } } dtbxFecha_de_toma1.setValue(ficha_epidemiologia_n22.getFecha_de_toma1()); dtbxFecha_de_recepcion.setValue(ficha_epidemiologia_n22.getFecha_de_recepcion()); chbMuestra.setChecked(ficha_epidemiologia_n22.getMuestra()); chbPrueba.setChecked(ficha_epidemiologia_n22.getPrueba()); tbxAgente.setValue(ficha_epidemiologia_n22.getAgente()); tbxResultado.setValue(ficha_epidemiologia_n22.getResultado()); dtbxFecha_de_recepcion1.setValue(ficha_epidemiologia_n22.getFecha_de_recepcion1()); tbxValor_registrado.setValue(ficha_epidemiologia_n22.getValor_registrado()); dtbxFecha_de_toma2.setValue(ficha_epidemiologia_n22.getFecha_de_toma2()); dtbxFecha_de_recepcion2.setValue(ficha_epidemiologia_n22.getFecha_de_recepcion2()); chbMuestra2.setChecked(ficha_epidemiologia_n22.getMuestra2()); chbPrueba2.setChecked(ficha_epidemiologia_n22.getPrueba2()); tbxAgente2.setValue(ficha_epidemiologia_n22.getAgente2()); tbxResultado2.setValue(ficha_epidemiologia_n22.getResultado2()); dtbxFecha_de_recepcion22.setValue(ficha_epidemiologia_n22.getFecha_de_recepcion22()); tbxValor_registrado2.setValue(ficha_epidemiologia_n22.getValor_registrado2()); tbxDiligenciado_por.setValue(ficha_epidemiologia_n22.getDiligenciado_por()); tbxTelefono_de_contacto.setValue(ficha_epidemiologia_n22.getTelefono_de_contacto()); // Mostramos la vista // tbxAccion.setText("modificar"); accionForm(true, tbxAccion.getText()); } catch (Exception e) { MensajesUtil.mensajeError(e, "", this); } }
public void onClick$reset() { name.setValue(""); auditState.getItemAtIndex(0).setSelected(true); rank.getItemAtIndex(0).setSelected(true); }