private void populateRecordBrowser(VitalSignsLiteVoCollection voColl) { if(voColl == null) return; form.recbrHistory().clear(); for (int i = 0; i < voColl.size(); i++) { VitalSignsLiteVo vo = voColl.get(i); form.recbrHistory().newRow(voColl.get(i), getAuthoring(vo)); } if (form.getLocalContext().getEditedRecordIsNotNull()) form.recbrHistory().setValue(form.getLocalContext().getEditedRecord()); else form.recbrHistory().setValue(voColl.get(0)); }
public VitalSignsLiteVoCollection listVitalSignsLiteVo(CareContextRefVo refCareContext) { if(refCareContext == null || !refCareContext.getID_CareContextIsNotNull() ) return null; DomainFactory factory = getDomainFactory(); List vitalSignsLite = factory.find("select v1_1 from VitalSigns as v1_1 left join v1_1.careContext as c1_1 where c1_1.id = :idCareContext", new String[]{"idCareContext" }, new Object[]{ refCareContext.getID_CareContext()}); VitalSignsLiteVoCollection voCollVitalSignsLite = VitalSignsLiteVoAssembler.createVitalSignsLiteVoCollectionFromVitalSigns(vitalSignsLite); if(voCollVitalSignsLite.size()>0) { voCollVitalSignsLite.sort(SortOrder.DESCENDING); return voCollVitalSignsLite; } else return null; }