private void populateAdviceToGPGrid(AdviceToGPCollection adviceGivenToGP) { form.grdAdviceToGP().getRows().clear(); for (int k = 0; k < adviceGivenToGP.size(); k++) { grdAdviceToGPRow row = form.grdAdviceToGP().getRows().newRow(); row.setcolFinding(adviceGivenToGP.get(k)); row.setcolSelect(true); } }
private AdviceToGPCollection populateAdviceGivenToGPFromGrd() { AdviceToGPCollection collAdviceToGP = new AdviceToGPCollection(); for (int i = 0; i < form.grdAdviceToGP().getRows().size(); i++) { grdAdviceToGPRow row = form.grdAdviceToGP().getRows().get(i); if(row.getcolSelect()) collAdviceToGP.add(row.getcolFinding()); } if(collAdviceToGP.size()==0) return null; return collAdviceToGP; }