private void populateNotesGrid(HospitalAtNightNotesVoCollection notes) { form.grdUpdatedNotes().getRows().clear(); if(notes == null || notes.size() == 0) return; for(int i=0; i<notes.size(); i++) { HospitalAtNightNotesVo note = notes.get(i); if(note == null) return; grdUpdatedNotesRow row = form.grdUpdatedNotes().getRows().newRow(); addNotesGrid(note, row); } }
private HospitalAtNightNotesVoCollection populateDataFromNotesGrid() { HospitalAtNightNotesVoCollection notes = new HospitalAtNightNotesVoCollection(); for(int i=0; i<form.grdUpdatedNotes().getRows().size(); i++) { notes.add(form.grdUpdatedNotes().getRows().get(i).getValue()); } return notes.size() > 0 ? notes : null; }