/** * @param sitesResultsVoColl */ private MRSASitesResultsVoCollection populateSitesResultsCollectionFromGrid() { GenForm.grdMRSAAssChildRow childRow = null; MRSASitesResultsVoCollection sitesResultsVoColl = new MRSASitesResultsVoCollection(); for(int z=0; z<form.grdMRSAAssChild().getRows().size(); z++) { childRow = form.grdMRSAAssChild().getRows().get(z); MRSASitesResultsVo voMRSASite = childRow.getValue(); voMRSASite.setSite(childRow.getcolSite()); voMRSASite.setResult(childRow.getcolResult()); voMRSASite.setDateResult(childRow.getcolDateResult()); sitesResultsVoColl.add(voMRSASite); } return sitesResultsVoColl; }
private void populateScreeningGrid(MRSAAssessmentVo voMRSA) { form.grdScreening().getRows().clear(); if (voMRSA == null) return; MRSASitesResultsVoCollection voSitesResultColl = null; MRSASitesResultsVo voSitesResult = null; GenForm.grdScreeningRow row = null; row = form.grdScreening().getRows().newRow(); if (voMRSA.getDateScreening() != null) row.setColDateScreening(voMRSA.getDateScreening().toString()); row.setValue(voMRSA); voSitesResultColl = voMRSA.getSitesAndResults(); if (voSitesResultColl != null) { GenForm.grdScreeningRow cRow = null; for (int p = 0; p < voSitesResultColl.size(); p++) { voSitesResult = voSitesResultColl.get(p); cRow = row.getRows().newRow(); if (voSitesResult.getOther() != null) cRow.setColDateScreening(voSitesResult.getOther()); else if (voSitesResult.getSite() != null) cRow.setColDateScreening(voSitesResult.getSite().getText()); if (voSitesResult.getDateResult() != null) cRow.setColDateResult(voSitesResult.getDateResult().toString()); if (voSitesResult.getResult() != null) cRow.setColResult(voSitesResult.getResult().getText()); cRow.setValue(voSitesResult); cRow.setSelectable(false); } } form.grdScreening().expandAll(); }