private void populateNutritionalGrd(NutritionalMethodCollection voNutritionalMetColl) { if (voNutritionalMetColl != null) { GenForm.container1Container.gridNutritionalRow nRow; for (int i=0; i<voNutritionalMetColl.size(); i++) { NutritionalMethod method = voNutritionalMetColl.get(i); nRow = form.container1().gridNutritional().getRowByValue(method); if (nRow != null) nRow.setColSelected(true); else { nRow = form.container1().gridNutritional().getRows().newRow(); nRow.setValue(method); nRow.setColNutritional(method.getText()); nRow.setColSelected(true); } } } }
private void prePopulateNutritionalGrd() { // Populate gridNutritional with lookup values NutritionalMethodCollection nutColl = ims.nursing.vo.lookups.LookupHelper.getNutritionalMethod(domain.getLookupService()); form.container1().gridNutritional().getRows().clear(); GenForm.container1Container.gridNutritionalRow nRow; for (int i=0; i<nutColl.size(); i++) { NutritionalMethod method = nutColl.get(i); nRow = form.container1().gridNutritional().getRows().newRow(); nRow.setValue(method); nRow.setColNutritional(method.getText()); nRow.setColSelected(false); } }