private PresProblemChecklistConfigVo populateInstanceData(PresProblemChecklistConfigVo voPresProblemChecklistConfig) { if (voPresProblemChecklistConfig.getPresentingProblems() != null) voPresProblemChecklistConfig.getPresentingProblems().clear(); else voPresProblemChecklistConfig.setPresentingProblems(new ProblemListVoCollection()); TreeNode node = findEnabledNode(); if (node == null) { return voPresProblemChecklistConfig; } for (int i = 0; i < node.getNodes().size(); i++) voPresProblemChecklistConfig.getPresentingProblems().add((ProblemListVo) node.getNodes().get(i).getValue()); return voPresProblemChecklistConfig; }
private void displayConfigItem(ProblemListVoCollection voCollProblems) { if (voCollProblems == null) return; TreeNode nodeToUse = form.treConfig().getSelectedNode(); if (nodeToUse == null) return; while (nodeToUse.getParent() != null) nodeToUse = nodeToUse.getParent(); nodeToUse.getNodes().clear(); for (int i = 0; i < voCollProblems.size(); i++) { TreeNode nodeProblem = null; nodeProblem = nodeToUse.getNodes().add(voCollProblems.get(i), voCollProblems.get(i).getPresentingProblem().getPCName()); nodeProblem.setExpandedImage(form.getImages().Core.BlueSquare); nodeProblem.setCollapsedImage(form.getImages().Core.BlueSquare); nodeProblem.setSelectedImage(form.getImages().Core.BlueSquare); } nodeToUse.setExpanded(true); }