private void populateChildCollectionFromGrid(GaitVo voGait) { if (form.grdGait().getValue() == null) return; if (voGait.getGaitTreatment() == null) voGait.setGaitTreatment(new GaitTreatmentVoCollection()); GenForm.grdGaitRow parentRow = form.grdGait().getValue() instanceof GaitShortVo ? form.grdGait().getSelectedRow() : form.grdGait().getSelectedRow().getParentRow(); if (parentRow.getRows().size() > 0 ) voGait.getGaitTreatment().clear(); for (int i=0; i < parentRow.getRows().size(); i++) { voGait.getGaitTreatment().add((GaitTreatmentVo) parentRow.getRows().get(i).getValue()); } }
private void populateChildNodes(grdGaitRow parRow, GaitTreatmentVoCollection voGaitTreatColl) { if (voGaitTreatColl == null || voGaitTreatColl.size()<=0) return; voGaitTreatColl.sort(); for(int i=0; i<voGaitTreatColl.size(); i++) { if (parRow != null) { GenForm.grdGaitRow childRow = parRow.getRows().newRow(); populateChildNode(childRow, voGaitTreatColl.get(i)); } } }
private void newParentInstance() { GaitVo voNewParent = new GaitVo(); voNewParent.setAuthoringHCP((Hcp) domain.getHcpUser()); voNewParent.setAuthoringDateTime(new DateTime()); voNewParent.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact()); voNewParent.setGaitTreatment(new GaitTreatmentVoCollection()); populateParentInstanceControls(voNewParent); form.getLocalContext().setSelectedParentInstance(voNewParent); }