private HospitalAtNightClinicalTaskCollection getClinicalTasksFromScreen() { HospitalAtNightClinicalTaskCollection tasks = new HospitalAtNightClinicalTaskCollection(); for(int i=0; i< form.grdClinicalTask().getRows().size(); i++) { if(form.grdClinicalTask().getRows().get(i).getValue() instanceof HospitalAtNightClinicalTask) tasks.add(form.grdClinicalTask().getRows().get(i).getValue()); } return tasks.size() > 0 ? tasks : null; }
private void populateClinicalTaskGridWithValues() { if(form.getGlobalContext().Clinical.getClinicalTasks() == null) return; for(int i=0; i<form.getGlobalContext().Clinical.getClinicalTasks().size(); i++) { HospitalAtNightClinicalTask task = form.getGlobalContext().Clinical.getClinicalTasks().get(i); grdTasksRow row = form.grdTasks().getRowByValue(task); if(row != null) row.setColSelect(true); } }