public void chklistEditSelEvent() { System.out.println("Inside chklistSelEvent"); if (getSelectedChkList() == 0) { setDisplayTable(false); setCreateSelectFS(true); setVersionSelection(true); } else { setDisplayTable(true); setCreateSelectFS(false); setVersionSelection(false); for (AuditDataChecklist ck : getAllChecklists()) { if (ck.getPkCheckId().intValue() == getSelectedChkList()) { setSelCheckList(ck); } } setCurrentVersion(checklistService.getVersion(getSelCheckList())); List<Integer> tempQustCheckMaps = new ArrayList<Integer>(); for (AuditDataQustCheckMap qcM : getSelCheckList().getAuditDataQustCheckMaps()) { tempQustCheckMaps.add(qcM.getPkQcMapId()); } qlist = checklistService.getChklistQuestions(getCurrentVersion(), tempQustCheckMaps); setValidColKeys(chklstSelService.getDynamicColumns(selCheckList)); for (String str : getValidColKeys()) { if (getColumnTemplate().length() <= 1) { columnTemplate = columnTemplate.concat(str); } else { columnTemplate = columnTemplate.concat("-").concat(str); } } System.out.println("Vcolumn Template" + columnTemplate); createDynamicColumns(); } }
private boolean isDuplicateQuestionSet() { List<Integer> tempQustCheckMaps = new ArrayList<Integer>(); List<Integer> temp = new ArrayList<Integer>(); for (AuditDataQustCheckMap qcM : getSelCheckList().getAuditDataQustCheckMaps()) { tempQustCheckMaps.add(qcM.getPkQcMapId()); } List<AuditDataQuestion> tempQues = checklistService.getChklistQuestions(getCurrentVersion(), tempQustCheckMaps); tempQustCheckMaps.clear(); for (AuditDataQuestion adq : tempQues) { tempQustCheckMaps.add(adq.getPkQuestionId()); } for (AuditDataQuestion adq : getQlist()) { temp.add(adq.getPkQuestionId()); } for (Integer in : temp) { if (tempQustCheckMaps.contains(in.intValue())) { tempQustCheckMaps.remove(in); } } if (tempQustCheckMaps.size() < 1) { return true; } else { return false; } }