private void populateAdmissionTypeGrid() { form.grdAdmissionType().getRows().clear(); MethodOfAdmissionCollection collAdmissionType = LookupHelper.getMethodOfAdmission(domain.getLookupService()); if (collAdmissionType==null) return; for (int i=0;i<collAdmissionType.size();i++) { if (collAdmissionType.get(i).isActive()) { grdAdmissionTypeRow row = form.grdAdmissionType().getRows().newRow(); row.setcolAdmissionType(collAdmissionType.get(i).getIItemText()); row.setcolSelected(false); row.setValue(collAdmissionType.get(i)); } } }
private void populateAdmissionType(MethodOfAdmissionCollection methodOfAdmissionCollection) { for (int i=0;i<form.grdAdmissionType().getRows().size();i++) { if (methodOfAdmissionCollection.contains(form.grdAdmissionType().getRows().get(i).getValue())) { form.grdAdmissionType().getRows().get(i).setcolSelected(true); } } }
private MethodOfAdmissionCollection getAdmissionTypeSelected() { MethodOfAdmissionCollection collMethodOfAdmission = new MethodOfAdmissionCollection(); for (int i=0;i<form.grdAdmissionType().getRows().size();i++) { if (form.grdAdmissionType().getRows().get(i).getcolSelected()) collMethodOfAdmission.add(form.grdAdmissionType().getRows().get(i).getValue()); } return collMethodOfAdmission; }