private DrivingVo populateDataFromScreem(DrivingVo voDriving) { if(voDriving.getCareContext() == null) voDriving.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voDriving.setAuthoringCP(form.qmbAuthoringCP().getValue()); DateTime dateTime = form.dtimAuthoring().getValue(); if(dateTime!=null){ if(form.dtimAuthoring().getValue().getDate()==null){ engine.showMessage("Please enter Date."); return null; } if(form.dtimAuthoring().getValue().getTime()==null){ engine.showMessage("Please enter Time."); return null; } } voDriving.setAuthoringDateTime(dateTime); DrivingAspectVoCollection collDrivingAspectVo = new DrivingAspectVoCollection(); GenForm.grdDrivingRow rowDriving = null; for (int i = 0; i< form.grdDriving().getRows().size(); i++) { rowDriving = form.grdDriving().getRows().get(i); DrivingAspectVo voDrivingAspect = new DrivingAspectVo(); voDrivingAspect.setAspect(rowDriving.getColDriving()); voDrivingAspect.setStatus(rowDriving.getColStatus()); voDrivingAspect.setComment(rowDriving.getColComments()); collDrivingAspectVo.add(voDrivingAspect); } voDriving.setDrivingAspect(collDrivingAspectVo); voDriving.setDrivingCommencedDate(form.pdtDrivingStart().getValue()); voDriving.setVehicleType(form.txtTypeOfVehicle().getValue()); voDriving.setSpecialistInfoEquip(form.txtSpecialistInfo().getValue()); return voDriving; }