private void addNewActionRowRecord(PlanOfCareListVo record) { if(record == null) return; GenForm.lyr1Layer.tabNewActionsContainer.grdActionsRow row = form.lyr1().tabNewActions().grdActions().getRows().newRow(); row.setColPoc(record.getTitle()); if (record.getLevelOfIntervention().equals(Color.Red)) row.setColImage(form.getImages().Core.RedSqaure); if (record.getLevelOfIntervention().equals(Color.Yellow)) row.setColImage(form.getImages().Core.YellowSquare); if (record.getLevelOfIntervention().equals(Color.Green)) row.setColImage(form.getImages().Core.GreenSquare); row.setValue(record); }
protected void onDyngrdPOCCellButtonClicked(DynamicGridCell cell) { if (cell != null && cell.getType().equals(DynamicCellType.IMAGEBUTTON)) { if(cell.getRow().getValue() instanceof PlanOfCareListVo) { PlanOfCareVo record = new PlanOfCareVo(); PlanOfCareLiteVo voRow = (PlanOfCareLiteVo) cell.getRow().getValue(); record = domain.getPlanOfCare(voRow); form.getLocalContext().setSelectedRecord(record); String url = getUrlText(record); if(url != null && url.length() > 0) { engine.openUrl(url); } } } }
private PlanOfCareActionsVoCollection populateDataFromScreen() { PlanOfCareActionsVoCollection coColl = new PlanOfCareActionsVoCollection(); for(int x = 0; x < form.lyr1().tabNewActions().grdActions().getRows().size(); x++) { PlanOfCareListVo rowValue = form.lyr1().tabNewActions().grdActions().getRows().get(x).getValue(); String action = form.lyr1().tabNewActions().grdActions().getRows().get(x).getColAction(); // if(validateActionText(action)) // return null; PlanOfCareActionsVo newActionVo = new PlanOfCareActionsVo(); if (rowValue != null && action != null && action.length() > 0) { //Authoring Component if (form.lyr1().tabNewActions().customAuthoring().getValue().getAuthoringDateTimeIsNotNull() && form.lyr1().tabNewActions().customAuthoring().getValue().getAuthoringHcpIsNotNull()) { AuthoringInformationVo voAuthoringInformation = new AuthoringInformationVo(); voAuthoringInformation.setAuthoringDateTime(form.lyr1().tabNewActions().customAuthoring().getValue().getAuthoringDateTime()); voAuthoringInformation.setAuthoringHcp(form.lyr1().tabNewActions().customAuthoring().getValue().getAuthoringHcp()); newActionVo.setAuthoringInformation(voAuthoringInformation); } //Action newActionVo.setAction(action); //PlanOfCare newActionVo.setPlanOfCare(rowValue); //add row to collection coColl.add(newActionVo); } } /* String [] error = coColl.validate(); if(error != null && error.length != 0) { engine.showErrors(error); return null; }*/ return coColl; }
private String getUrlText(PlanOfCareListVo voPocList) { return voPocList.getAssessmentQuestionIsNotNull()?voPocList.getAssessmentQuestion().getURL():""; }