@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { if(form.getGlobalContext().COE.getAssessmentMobility().getIsComplete()) { form.setMode(FormMode.VIEW); } else { form.setMode(FormMode.EDIT); } EnvironmentalChecklistVo voEnvironmentalChecklistVo = form.getGlobalContext().COE.getAssessmentMobility().getEnvironmentChecklist(); form.htmQuestion().setHTML("<h2 style=font-family:verdana align=center>Can you answer YES to all of the above questions?<br> If not, remedy any deficiencies without delay.</h2>"); if(voEnvironmentalChecklistVo == null) { loadChecklistGridFromLookup(); form.dteDate().setValue(new Date()); form.timTime().setValue(new Time()); if(domain.getMosUser() != null) form.txtHcp().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString()); return; } EnvironmentalChecklistDetailVoCollection collDetails = voEnvironmentalChecklistVo.getChecklistDetails(); //form.getLocalContext().setChecklistItem(voEnvironmentalChecklistVo); //contine here displaying header info then get the details if (voEnvironmentalChecklistVo.getAuthoringInformationIsNotNull()){ if(voEnvironmentalChecklistVo.getAuthoringInformation().getAuthoringDateTimeIsNotNull()){ form.dteDate().setValue(voEnvironmentalChecklistVo.getAuthoringInformation().getAuthoringDateTime().getDate()); form.timTime().setValue(voEnvironmentalChecklistVo.getAuthoringInformation().getAuthoringDateTime().getTime()); } if (voEnvironmentalChecklistVo.getAuthoringInformation().getAuthoringHcpIsNotNull()) form.txtHcp().setValue(voEnvironmentalChecklistVo.getAuthoringInformation().getAuthoringHcp().toString()); } if(collDetails != null) { loadChecklistGridFromLookup(); for(int i=0;i<collDetails.size();i++) { GenForm.grdChecklistRow row = null; int r=0; boolean bChecklistTypeFound = false; for(r=0;r<form.grdChecklist().getRows().size(); r++) { row = form.grdChecklist().getRows().get(r); if(collDetails.get(i).getChecklistType().equals(row.getcolChecklistItem())){ row.setValue(collDetails.get(i)); row.setcolStatus(collDetails.get(i).getAnswer()); bChecklistTypeFound = true; } } if(!bChecklistTypeFound) { row = form.grdChecklist().getRows().newRow(); row.setValue(collDetails.get(i)); row.setcolChecklistItem(collDetails.get(i).getChecklistType()); row.setcolStatus(collDetails.get(i).getAnswer()); } } } }